Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 02-18-2009, 12:08 PM Display queries
Junior Talker

Posts: 1
Trades: 0
I building a website using Drupal, and i have some problem which i cant find in internet. I want to display number of query been used to display a page at the end of the page. Can anyone give me code to doing that or is it not possibly to do that? I want to do like Phpbb, it display query at the end of the page. Thank you.
kripkorn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-23-2009, 08:22 PM Re: Display queries
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Sure, you can use some PHP code, similar to...
PHP Code:
<?php
$GLOBALS
['_MYSQL_QUERY_COUNT'] = 0;
function 
exec_mysql_query($sql)
{
++
$GLOBALS['_MYSQL_QUERY_COUNT'];
return 
mysql_query($sql);
}
echo 
$_MYSQL_QUERY_COUNT.' Queries ';
?>
- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Display queries
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36062 seconds with 12 queries