Jump to content

PHP MYSQL Help


Monkuar

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/252173-php-mysql-help/
Share on other sites

  Quote

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?

Link to comment
https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292923
Share on other sites

  Quote

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.

sw1v.png

sw2o.png

 

 

When I use your query it just show no data, but no error also? hmmm

Link to comment
https://forums.phpfreaks.com/topic/252173-php-mysql-help/#findComment-1292925
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.