This is not an error Your query is executed, and you get the corresponding resource from mysql_query() , since it must be returned.
To get the answer you should use mysql_fetch_array() or mysql_fetch_assoc()
mysql_connect("localhost", "root", "password") or die(mysql_error()); mysql_select_db("treehouse_movie_db") or die(mysql_error()); $data = mysql_query("SELECT * FROM movies") or die(mysql_error()); while($row = mysql_fetch_assoc($data)) { print_r($row); }
OFFER: mysql_ * are no longer supported. Go to mysqli_ * or PDO
source share