Jump to content

Selecting certain mysql row.


whelpton

Recommended Posts

Hi guys,

 

essentially, I have very limited knowledge with mysql and have hit a brick wall.

 

The row that I am trying to select is the following:

example.png

 

Now, I am trying to use the following script to achieve that:

 

$query = "SELECT meta_value FROM wp_usermeta WHERE user_id='$id' & meta_key='simple_local_avatar'";

 

The $id is being passed as 1 from a cookie, and I know for sure that thats working properly, but I cant figure out the coding to select it correctly.

 

I need the script to search for the ID of the user & then user the simple_user_avatar to find the right entry.

 

Please someone cast your knowledge and help me out!

 

Oh, little adendum.

 

All that happens when the script runs is that the first row of the table is called out, which is:

 

example2.png

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.