Hello, I have a script to find the lowest value from a column but some entries dont have a value or its set to 0 if this is the case I'd like ti to find the next lowest value.
Here is my sql command.
$result = mysql_query("SELECT DISTINCT product_name, format, image_url, MIN(online_price), EAN FROM products where $searchstring and format = '{$cat}' AND EAN != ' ' AND EAN != '-' AND EAN != 'PRERELEASE' AND online_price > '0' group by EAN LIMIT " . ($page-1)*$Limit . ",$Limit");
Any ideas?