我总是最终做到这一点。
$q = "select whatIwant FROM table where id = 'myId'";
$r = mysql_query($q);
while($i = mysql_fetch_array($r){
/* iterate just one withem */
$j = $i['whatIwant'];
}
echo $j;
通常如何实现这个?(我只是想避免不必要的循环)