desjardins2010 Posted December 7, 2013 Share Posted December 7, 2013 i get an error Warning: mysql_query() expects parameter 1 to be string, resource given in /home/jeffdesj/public_html/clicker/index.php on line 71 $select = mysql_select_db("jeffdesj_clicker"); $result = mysql_query($connect,"SELECT * FROM `sites`"); while ($row = mysql_fetch_array($result)) { $header = $row['header']; $image = $row['image']; $date = $row['date']; } Quote Link to comment https://forums.phpfreaks.com/topic/284609-whats-wrong-with-this-code/ Share on other sites More sharing options...
hitman6003 Posted December 7, 2013 Share Posted December 7, 2013 Reverse the options for mysql_query... mysql_query("SELECT * from sites", $connect); Quote Link to comment https://forums.phpfreaks.com/topic/284609-whats-wrong-with-this-code/#findComment-1461596 Share on other sites More sharing options...
mike12255 Posted December 7, 2013 Share Posted December 7, 2013 I would also recommend moving to mysqli. Your application with become obsolete in the near future if you dont. Quote Link to comment https://forums.phpfreaks.com/topic/284609-whats-wrong-with-this-code/#findComment-1461614 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.