Problem when use "LEFT JOIN"
Posted: Thu Nov 27, 2003 8:46 am
In my project, I have to run
but I have a field named "id" in both poll_opt and poll_sub, how can I distinguish them when i use $data["id"].
Code: Select all
$res = mysql_query("SELECT * FROM poll_opt LEFT JOIN poll_sub ON poll_opt.subid = poll_sub.id");
while ($data = mysql_fetch_array($res)) {
...
poll_id = $dataї"id"];
...
}