Seems simple but what am I doing wrong here? I just want the max value in a column for a given vendor ID. Can I use the as clause in a recordset?
$query = mysql_query("SELECT max(container_no) as newcontainer
FROM FETE_profiles WHERE vendor_id = '$mvendorid'");
while($rst = mysql_fetch_array($query)) {
print $rst[newcontainer] . "<br/>";
}
got it working everyone thanks for all your answers. It was code above, pushing a vendor id into this sql statement which had no representative rows in the profiles table.
duh! well that happens when you dont have the luxury of peer review 🙂