bradgrafelman;10908610 wrote:So just put those words into logical statements, wrap a couple of SQL keywords around it, and you've got yourself a SQL query:
SELECT products_image FROM myTable WHERE products_special_image IS NULL GROUP BY products_id ORDER BY products_image_id ASC
Thanks for your reply... I tried it but nothing shows! This is what I have (the table is also named products_image)..
----------------------
$query = mysql_query("SELECT products_image FROM products_image WHERE products_special_image IS NULL GROUP BY products_id ORDER BY products_image_id ASC");
while($row = mysql_fetch_array($query))
{
echo $row['products_image'];
echo "<br /><br/>";
}
--------------
Please forgive me if this is a stupid mistake.. I'm really a newbie. Furthermore, I need to incorporate this to my original chunk of code, any advice?
$query = mysql_query("SELECT DISTINCT * FROM products, products_description WHERE products.products_id = products_description.products_id AND products_description.language_id = '4' AND products.products_status = '1' ORDER BY products.products_last_modified desc");
while($row = mysql_fetch_array($query))
{
echo "<font size=1>".$row['products_id'] . " | " .$row['products_name']. " | " .$row['products_head_title_tag'] ." | " .$row['products_last_modified'] ." | " .$row['language_id']. "</font>";
echo "<br /><br/>";
}
Thanks again