- if ($supplier_id == "")
- {
- $sql = "SELECT supplier_id FROM ".TB_PREF."suppliers WHERE inactive=0 ORDER BY supp_ref LIMIT 1";
- $result = db_query($sql, "could not retreive first supplier");
- $row = db_fetch_row($result);
- $supplier_id = $row[0];
- }