kneuf
08-03-2003, 11:58 AM
Hi there, I need to know how to show the number of queries a script uses. I know of forums that do, but I don't have enough time to download them and look for it. BTW, by queries I mean mySQL queries, and in PHP of course. Or if there is already an article/tutorial on this, please give me the link. I tried google, but no luck...
Daijoubu
08-03-2003, 02:01 PM
You'll need to make a class/function that does all the query
and everytime you do a query, make it increase a var (ie: $countquery++)
digitok
08-03-2003, 08:19 PM
You have a page like 'core.php' or something and in that you have 'global $queries;' then you make a function like 'query()' to run the query and increase the $queries variable, then you just use $queries at the end of your page..
Hope this helps.