![]() |
How do I display a result of a query?
Well I'm trying to show the Results from a data base query in a templeat can any one tell me how to do this?
|
Quote:
Then just use $foo[foo] in the templates. |
I know how to do arrays but can you show me a exaple code my tables fields are:
id name url description |
$variable = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "tablename WHERE id = id");
$variable['id'] $variable['name'] $variable['url'] $variable['description'] |
thank you
That code cases errors anyone? |
help!
|
what error?????
|
I get:
Parse error: parse error, unexpected T_VARIABLE in /home/rdsx667/public_html/tutorials/test.php on line 55 EDIT: before this code there was no error ( This isn't suppose to sound rude) |
please disply your code to me. lines 50-60.
|
heres the code:
$variable = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "tablename WHERE 1 = Links"); $variable['id'] $variable['name'] $variable['url'] $variable['description'] eval('print_output("' . fetch_template('site_test') . '");'); |
All times are GMT. The time now is 06:24 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:
|