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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.