With all my includes and code on other pages my project is getting pretty big. I was wondering if there was some way, php or otherwise I could check how many separate queries to a database each page makes? Im rocking localhost so if cpanel can do this its not applicable at the moment but I would like to know if it is possible at all. I just want to control redundant queries and this data could help me
ok. it can act like a hit counter. i'm suggesting a way. every script and every query code, you have to add another query which will add 1 to your query table. mainly it will add 2, because this query is also a query which we should count. now find all queryies in your php code and add another php query operation after that which will work as counter. it will be quite easier to make report for all pages in one table rather than gernerating for seperate page(it's going to be complicate).
Custom php website(localhost at the moment). built from scratch. 2 years knowing php. Which is why this data would be awesome. For the first replier, I thought of that however that would DOUBLE the amount of queries which is not what I want to do at all. I just use, insert, update and select. That is it. I was thinking on $i++ after each query then echo that number at the bottom of each page or something.
If the database is shared, use a variable to hold the count after each query. If the database is dedicated, you might be able to use the status query, which tells you the average queries count.
what is the difference between shared and dedicated. There is just one database I use with about 50 tables in it I never plan on having more then one database and live it is one dedicated server. im thinking that the var route will be the one i might have to take. Thank you all for your replies