我收到以下错误,字段列表中的列“id”不明确。我怎样才能从这个语句中唯一地获取正确的 ID
function data () {
if($at = mysql_real_escape_string(@$_GET['id'])){$at = mysql_real_escape_string(@$_GET['id']);
$arg = func_get_args();
unset($arg[0]);
$fields = '`'.implode('`,`', $arg).'`';
$query = mysql_query("SELECT $fields FROM `list` LEFT JOIN fruits ON location.id =
fruits.fid
LEFT JOIN store ON store.id = location.catid WHERE location.link = '$at'")or die(mysql_error());
$query_result = mysql_fetch_assoc($query);
$query_row = mysql_num_rows($query);
if($query_row==0){
return false;
}else{
foreach ($arg as $field){
$arg[$field] = $query_result[$field];
}return $arg;
}
}
}