phingoc Posted December 4, 2011 Share Posted December 4, 2011 Warning: mysql_num_rows() expects parameter 1 to be resource what am i doing wrong? i have checked, double checked and tripple checked everything. include("mysql_connect.php"); $query = "SELECT * FROM prod2011 WHERE dato BETWEEN '$nyfra' AND '$nytil'"; $antall = mysql_num_rows($query); // I get error on this line. echo "Antall linjer i listen: " . $antall; Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 4, 2011 Share Posted December 4, 2011 The query is never actually executed with mysql_query(). $query = "SELECT * FROM prod2011 WHERE dato BETWEEN '$nyfra' AND '$nytil'"; $result = mysql_query($query); $antall = mysql_num_rows($result); 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.