Reply to status display

Your name:

Reply:


Posted by Prellyan on 11/11/06 04:36

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация