MyBB Community Forums

Full Version: Query SQL in templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I query my database in the templates?

Is it same way I do in PHP or is there special functions?
You'll need a plugin, you can't put a query into a template...
Hmm, soo i cant just say db->connect, db->query ?
(2009-07-29, 04:32 PM)Prudens Wrote: [ -> ]Hmm, soo i cant just say db->connect, db->query ?

Nope
No because that's PHP and you can't use that in templates... you'll need to do it in a plugin.
That is really gay. Can you tell me how to do it?
(2009-07-29, 05:11 PM)Prudens Wrote: [ -> ]That is really gay. Can you tell me how to do it?
You really make MYBB want to help you when you call their software gay.
If you think it's gay, why not make forum software that allows it?? Smile
Dude don't put words in my mouth. I love myBB. I'm just saying that is gay because I am not too smart on how to use php and stuff.
Being able to have SQL queries in templates would be suicide. Someone could hack into your forum, put a few queries into the index template that truncates every single table, then load the index page, and it'd be goodbye forum.
Pages: 1 2