What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php/mysql help - stats and templates?

php/mysql help - stats and templates?
Author: Message:
Fourjays
Full Member
***

Avatar
Jaguar E-Type

Posts: 134
Reputation: 6
36 / Male / –
Joined: Jan 2005
O.P. Huh?  php/mysql help - stats and templates?
Hey,
A thread for the technically minded. ;)

Im currently busy at work on my own blogging system (mainly as a method to learn), which I hope to release to the public in the not so far future. So far I have most of the major stuff covered.

However, the one thing which I haven't got (and numerous google searches have provided no glory either - probably wrong search terms), is all the page statistics, like you get at the bottom of alot of php scripts (it will be an option in the config). What code do I need to generate all the statistics, such as parse times, number of queries, etc?

Also, does anyone know of any really simple way to implement some kind of templating system? I would like to do this, so that it is easy for users to make their own templates, but so far all I have found is a load of stuff on special engines, and one tutorial on making your own engine - which I tried and just got pages of errors.

Thanks for your help. :D
[Image: msgsig7yx.jpg]
A new range of internet based services... Coming Soon(ish)! - www.fortheinter.net
07-04-2005 09:31 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: php/mysql help - stats and templates?
well to do the number of sql queries, you have to replace the SQL_query function with your own so it performs the query as well as incrementing a static variable then when you want to display the number of queires make it show it when the function takes no arguements.

I made that sound a lot more complicated than it is lol :P
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
07-04-2005 09:33 PM
Profile E-Mail PM Web Find Quote Report
Fourjays
Full Member
***

Avatar
Jaguar E-Type

Posts: 134
Reputation: 6
36 / Male / –
Joined: Jan 2005
O.P. RE: php/mysql help - stats and templates?
I don't suppose you can point me towards the right section on the php or mysql site, or another tutorial website?

It does sound kinda complicated. :s
[Image: msgsig7yx.jpg]
A new range of internet based services... Coming Soon(ish)! - www.fortheinter.net
07-04-2005 09:36 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: php/mysql help - stats and templates?
code:
function cnt_mysql_query($sql=FALSE)
    {
        static $queries = 0;
        if (!$sql)
        return $queries;
        $queries ++;
        return mysql_query($sql);
}

Then use cnt_mysql_query instead of mysql_query.  When you want to output the number just dont pass any arguements,
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
07-04-2005 09:43 PM
Profile E-Mail PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: php/mysql help - stats and templates?
Haha, what a couincidence, im doing the same project as you :)
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-05-2005 02:23 AM
Profile PM Web Find Quote Report
Snake
Full Member
***


Posts: 210
Reputation: 4
34 / Male / Flag
Joined: Jan 2004
RE: php/mysql help - stats and templates?
I was just starting to work on template systeam for a stupid littel phone book script I have been working on. Unfortunatly I blew the hard drive in my test server and didn't have the chance to start programing the template systeam.
[Image: sig.png]
07-05-2005 02:34 AM
Profile E-Mail PM Web Find Quote Report
Fourjays
Full Member
***

Avatar
Jaguar E-Type

Posts: 134
Reputation: 6
36 / Male / –
Joined: Jan 2005
O.P. RE: php/mysql help - stats and templates?
quote:
Originally posted by Shawnz
Haha, what a couincidence, im doing the same project as you :)

Maybe we should work together then. ;)

I want mine to be as versatile as possible, so that the user can do just about anything they want with it. I'm planning on having another go at getting a templating system working today, as I feel this is important for easy customisation.
[Image: msgsig7yx.jpg]
A new range of internet based services... Coming Soon(ish)! - www.fortheinter.net
07-05-2005 10:31 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On