fer0an Posted October 17, 2010 Share Posted October 17, 2010 hello I'm using this code: $query="SELECT * FROM `second_content` WHERE CHANGED =0 limit 0,1"; to query first row data when I want see it and echo it I recived : Resource id #2 can anyone help me ? thank you Quote Link to comment Share on other sites More sharing options...
jl5501 Posted October 17, 2010 Share Posted October 17, 2010 What code are you executing after setting up that query variable? Are you connecting to a database? what code is returning the error? Quote Link to comment Share on other sites More sharing options...
eran Posted October 17, 2010 Share Posted October 17, 2010 mysql_query() returns a resource if the query was successful. To get database rows, you need to use fetch function such as mysql_fetch_assoc() on the result $result = mysql_query($query); i($result) { $row = mysql_fetch_assoc($result); } http://php.net/manual/en/function.mysql-fetch-assoc.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.