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 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); 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? 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
Archived
This topic is now archived and is closed to further replies.