![]() |
I'm writing a hack (ha! If you can even call it that - I'm not that talented)...and basically, I'd like to use SQL queries in the same format as vBulletin - since that seems to be the most logical thing to do...however, I can't get it to display more than one entry...any advice? I'll obviously need a while loop, but I'm not sure how to format it...
Here's what I have (which produces an error): Code:
$query2=$DB_site->query_first("SELECT * FROM savethreads WHERE saveuser='$username'"); Oh, also: I've created a custom template which is pulled onto a custom PHP page in my forums directory (thanks JimF! :D)...however the template displays first, with all my queries and their results below it all - how can I stick it in the middle of the template? I don't recall seeing actual queries used in any of the other templates...so I know there must be some other way. Thanks! :) |
Code:
$query2=$DB_site->query("SELECT * FROM savethreads WHERE saveuser='$username'"); |
Thanks Ed - very cool.
Anyone got any thoughts on the template problem? I'll bet the answer is simple - yet it escapes me somehow. :) |
Uh...the other thing still doesn't work I'm afraid:
Warning: Supplied argument is not a valid MySQL result resource in /usr/home/webdev/mycoding/spunkyjunk.com/docs/testboard/admin/db_mysql.php on line 82 Using this code: Code:
$query2=$DB_site->query("SELECT * FROM savethreads WHERE saveuser='$username'"); |
You need to replace $result with $query2
|
Oops, sorry 'bout that - thanks rangers.
|
Bingo! My mistake - still have a bit to learn about PHP's interaction with SQL (obviously) :)
Anyone else got the info on my template problem? It's one of the last hurdles in finishing the hack! :D |
Hmmm...maybe I'll be forced to figure it out myself, hehe. :)
It's okay - I can handle it! I hope! :) |
Post the code you have for your template.
|
Here's a new template I've created for one of the pages used in my hack:
Code:
{htmldoctype} |
All times are GMT. The time now is 12:49 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|