toby5482 |
02-19-2004 08:59 AM |
PHP/Smarty problem - Calling data from MySQL database
I'm trying to create a php file to call the description field from the categories table. Does anyone know what is wrong with the below code:
Quote:
function categorydesc($id) {
$id = array();
$query = "SELECT description FROM xcart_categories WHERE categoryid='$id'";
$result = mysql_query($query);
while ($desc = mysql_fetch_array($result));
{
print "Decription: $desc
";
}}
categorydesc(12)
?>
|
It displays "Description: " and then nothing.
|