We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Counting Queries; In PHP and MySQL.
Topic Started: Apr 8 2005, 01:28 PM (231 Views)
Dennis
Member
[ *  *  *  *  *  *  * ]
How would I go about setting up a script that counts queries. Would it count ones that were called from a functions file, or with an include of require function?
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Code:
 
$querycount = 0;

function my_query($sql) {
 $querycount++;
 mysql_query($sql);
}

my_query("SELECT...");
my_query("SELECT...");


? :huh:
Offline Profile Quote Post Goto Top
 
Dennis
Member
[ *  *  *  *  *  *  * ]
I mean to count the total queries used in a page, like on IPB's Debug page.
Offline Profile Quote Post Goto Top
 
KodeCing
Member
[ * ]
Make the query in a variable then echo the result on the same page but look at it using $_GET.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply