I have a site in which courses, students, affiliations added. on my home page i want to show how many students, affiliations, courses are registered. pls send code to show
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
That kind of depends...
The simple, yet slow answer would be:
SELECT COUNT(*) FROM TABLE_NAME
This could be slow if you have a lot of entries and the database doesn't keep track of rows.
You might be able to try a form of:
SHOW TABLE STATUS;
A bit of explaining the situation may be in order as far as the structure/type of database...