Hi
I usually write my SELECT query code out the long way using
$res = mysql_query("SELECT col FROM table WHERE row_id='".$id."'");
while($row=mysql_fetch_array($res)){
$var=$row['col'];
}
but is there a more concise way of doing it when i just want 1 value from 1 row ?
ideally like this :
$var=mysql_query("SELECT col FROM table WHERE row_id='".$id."'");
I've never seen it written like that so it's probably just wishful thinking - but is there something closer to that than what i usually do ?
thanks