Monkuar Posted December 1, 2011 Share Posted December 1, 2011 Hi everyone! I am stuck! SELECT config FROM inettuts WHERE user_id='5' This config pulls out this data: PostInfo,color-grey,User Info,not-collapsed|Twitter,color-grey,Twitter,not-collapsed;AboutMe,color-grey,AboutMe,not-collapsed|Signature,color-grey,Signature,not-collapsed From a Text field in the mysql db, it then it is translated from jquery to show a portable iGoogle like page. But the problem is, I need to make the query select everything but the "Twitter,color-grey,Twitter,not-collapsed" (TWITTER PART) how is this possible? Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/ Share on other sites More sharing options...
cmb Posted December 1, 2011 Share Posted December 1, 2011 if "|" represents a new record then try this SELECT config FROM inettuts WHERE user_id = '5' AND config != 'Twitter,color-grey,Twitter,not-collapsed' Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292875 Share on other sites More sharing options...
Monkuar Posted December 1, 2011 Author Share Posted December 1, 2011 if "|" represents a new record then try this SELECT config FROM inettuts WHERE user_id = '5' AND config != 'Twitter,color-grey,Twitter,not-collapsed' I tried everything, the | before and after, I don't think the "AND" etc is working when I already selected my initial user_id = 5?? could I use another "AND" replacement that might get it to work? Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292923 Share on other sites More sharing options...
scootstah Posted December 1, 2011 Share Posted December 1, 2011 Try something like this: SELECT config FROM inettuts WHERE user_id = '5' AND config NOT LIKE '%Twitter%' AND config NOT LIKE '%color-grey%' AND config NOT LIKE '%not-collapsed%' Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292924 Share on other sites More sharing options...
Monkuar Posted December 1, 2011 Author Share Posted December 1, 2011 Try something like this: SELECT config FROM inettuts WHERE user_id = '5' AND config NOT LIKE '%Twitter%' AND config NOT LIKE '%color-grey%' AND config NOT LIKE '%not-collapsed%' Thanks for your response, now it just shows nothing? I think this will be easier If I took screenshot's instead. This is the value stored in my "text" field. When I use your query it just show no data, but no error also? hmmm Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292925 Share on other sites More sharing options...
scootstah Posted December 1, 2011 Share Posted December 1, 2011 Isn't that what you wanted? To not show rows that meet those conditions? Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292928 Share on other sites More sharing options...
Monkuar Posted December 1, 2011 Author Share Posted December 1, 2011 Isn't that what you wanted? To not show rows that meet those conditions? They're not rows, there data inside 1 Field? Sorry for the misunderstanding Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292929 Share on other sites More sharing options...
Monkuar Posted December 2, 2011 Author Share Posted December 2, 2011 Bump ty Quote Link to comment https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1293353 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.