Jump to content

problem with Query


JamesThePanda

Recommended Posts

Hi

 

Im just working on a wordpress pugin at the moment and Iw as trying out this piece of code

 

$mylink = $wpdb->get_row("SELECT * FROM $wpdb->testtable WHERE id = 1");

 

echo $mylink->id ;

 

there is data in the table there is an id equal to one but it not coming up with anything

 

I tried it with anouther pable and it works fine I can for example

 

$mylink = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE id = 1");

 

echo $mylink->post_content ;

 

That comes up fine with the data

 

But the first one I dont know why its not working

 

 

can anyone help

 

 

Thanks

 

James

Link to comment
https://forums.phpfreaks.com/topic/229904-problem-with-query/
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.