Quote:
Originally Posted by mokonzi
Thanks for the help. So far, I've been able to get this query to work:
Code:
$version = $db->query_first("
SELECT 'versioname'
FROM mytable_pt_projectversion
WHERE projectid = 2 AND projectversiongroupid = 1 AND displayorder = 10;
");
vB_Template::preRegister('footer',array('txuversion' => $version));
But all that displays when I include the variable is array.
Am I missing something obvious?
Thanks again for the help, I'm a total noobie when it comes to programming... 
|
It is because it is an array of fields (in this case 1 field) you are getting back from your query.... you need to register the field, not the array, so your register line should probably look something like this:
Code:
vB_Template::preRegister('footer',array('txuversion' => $version['versioname']));