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
https://forums.phpfreaks.com/topic/229410-selecting-certain-mysql-row/
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.