idire Posted October 5, 2008 Share Posted October 5, 2008 Is there a mysql query that can count the total number of records in a database? Or do i need to select * from each table, then count the number of rows in query result? Thanks Link to comment https://forums.phpfreaks.com/topic/127161-total-records-in-database-select-query/ Share on other sites More sharing options...
genericnumber1 Posted October 5, 2008 Share Posted October 5, 2008 SELECT COUNT(*) FROM table Link to comment https://forums.phpfreaks.com/topic/127161-total-records-in-database-select-query/#findComment-657793 Share on other sites More sharing options...
DarkWater Posted October 5, 2008 Share Posted October 5, 2008 You might be better off aliasing the COUNT() value: SELECT COUNT(*) AS total FROM table; Link to comment https://forums.phpfreaks.com/topic/127161-total-records-in-database-select-query/#findComment-657794 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.