status display

Hey there,

I am trying to get an if/when statement to work however this is proving
fruitless at the moment.

I have a query

mysql_select_db($database_grange, $grange);
$query_productdesc = "SELECT * FROM products_description JOIN
products_to_categories ON products_description.products_id =
products_to_categories.products_id JOIN products ON
products.products_id = products_description.products_id WHERE
products_to_categories.categories_id = '$sql_recordID'";
$query_limit_productdesc = sprintf("%s LIMIT %d, %d",
$query_productdesc, $startRow_productdesc, $maxRows_productdesc);
$productdesc = mysql_query($query_limit_productdesc, $grange) or
die(mysql_error());
$row_productdesc = mysql_fetch_assoc($productdesc);

which i then need to integrate with

$status = mysql_query(' SELECT * FROM products_description JOIN
products_to_categories ON products_description.products_id =
products_to_categories.products_id JOIN products ON
products.products_id = products_description.products_id WHERE
products_to_categories.categories_id = '$sql_recordID'); while($row =
mysql_fetch_assoc($result)) { if ($row_productdesc['products_status']
== 0) { echo '<img src="redlight.png">'; } else { echo '<img
src="greenlight.png">' ;} }

so that the images display on return of the record set.

Any help is appreciated
Thanks
Prellyan [ Sa, 11 November 2006 05:36 ] [ ID #1532169 ]
PHP » alt.php.sql » status display

Vorheriges Thema: They say that "business is business" and that "ethics" and "principles"
Nächstes Thema: Problem with lower(