deansaddigh Posted February 26, 2010 Share Posted February 26, 2010 I have this but its obviously wrong $query = "SELECT * FROM enquiry ORDER BY date DESC"; $result = mysql_query($query, $conn) $rows = mysql_num_rows($query, $conn) or die ("Unable to perform query"); Can anyone help Quote Link to comment https://forums.phpfreaks.com/topic/193414-i-want-to-get-number-of-rows-as-well-as-execute-a-query/ Share on other sites More sharing options...
deansaddigh Posted February 26, 2010 Author Share Posted February 26, 2010 is this how you do it $query = "SELECT * FROM enquiry ORDER BY date DESC"; $result = mysql_query($query, $conn) or die ("Unable to perform query"); $rows = mysql_num_rows($result); Quote Link to comment https://forums.phpfreaks.com/topic/193414-i-want-to-get-number-of-rows-as-well-as-execute-a-query/#findComment-1018301 Share on other sites More sharing options...
trq Posted February 26, 2010 Share Posted February 26, 2010 is this how you do it $query = "SELECT * FROM enquiry ORDER BY date DESC"; $result = mysql_query($query, $conn) or die ("Unable to perform query"); $rows = mysql_num_rows($result); Did you test it? Quote Link to comment https://forums.phpfreaks.com/topic/193414-i-want-to-get-number-of-rows-as-well-as-execute-a-query/#findComment-1018419 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.