0

Hello ,

Can anybody tell me that is wrong in this statement
$data = mysql_query("SELECT Column1 FROM '$tbl_name' WHERE Column2 = '$image'");
I then tried
echo $data; - But no result
Basically i want to retrieve the value of Column1 where the value of Column2 is equal to the value stored in variable $image

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Khav
0

Wow......cereal bro thanks for the help once more but i get this now
mysql_fetch_object(): supplied argument is not a valid MySQL result resource
I assure you that the connections are good as an insert query works fine

1

Fixed it myself :D
Good statement is
$data = mysql_query("SELECT Column1 FROM $tbl_name'WHERE Column2 = '$image'")

The rest , cereal bro shwos it clearly how to echo successfully

Edited by Khav: added credits to cereal

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.