PDA

View Full Version : Hit a dead end...


MarkB
11-23-2001, 06:44 AM
...and i need some direction please :)

I've created a new table - let's call it 'mark'

there're four field within it:

id
category
description
image

If I wanted to call the values of these fields into a vB template, what exactly would I need to do?

I thought I would be able to just do something like:

$DB_site->query("SELECT image,description FROM mark WHERE id=$id");

and then use codes such as $image or $mark[image], but I'm assuming that's not right, cos it just comes out blank :o

I imagine I may need to edit functions.php or global.php, but as has been demonstrated by my stoopid questions in the past, I'm not that bright when it comes to PHP ;)

Any assistance would be appreciated :D

PS - anyone else think a 'Creating Hacks For vBulletin' tutorial would be welcomed by thousands?;)

Lesane
11-23-2001, 07:23 AM
Originally posted by MarkB
PS - anyone else think a 'Creating Hacks For vBulletin' tutorial would be welcomed by thousands?;)

100% Yes

Admin
11-23-2001, 10:50 AM
$mark=$DB_site->query_first("SELECT image,description FROM mark WHERE id=$id");
Then you'll be able to use $mark[image] etc.

MarkB
11-23-2001, 10:59 AM
Thanks Firefly, yet again :) I really appreciate your help :)