$q = mysql_query("SELECT `a`, `b` FROM `tablo` ORDER BY `a` DESC LIMIT 0,1") or die(mysql_error());
$row = mysql_fetch_assoc($q);
foreach($row as $k => v)
{
$$k = $v;
}
$a = !empty($a) ? $a : 1; // Boşsa 1 olsun
$b = !empty($b) ? $b : 1; // Boşsa 1 olsun
$c = !empty($c) ? $c : 1; // Boşsa 1...