ecabrera Posted March 6, 2013 Share Posted March 6, 2013 How would i display the count in mysqli $pagesql = "SELECT COUNT('id')FROM `orders`"; $result = mysqli_query($db,$pagesql); I have try echoing out the mysqli_num_rows but i get one Link to comment https://forums.phpfreaks.com/topic/275336-select-count/ Share on other sites More sharing options...
Jessica Posted March 6, 2013 Share Posted March 6, 2013 1. Put a space after the ). 2. Use a column name, not a string. 3. Give it an alias: COUNT(id) AS orders_count 4. Fetch the row. Link to comment https://forums.phpfreaks.com/topic/275336-select-count/#findComment-1417002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.