View Full Version : ambiguous

02-06-2007, 11:56 AM
When I tried to run my script, this error is showing:

Error: Column 'profile_field_id' in from clause is ambiguous
in query: "SELECT `field`.*, `match_field_name`.`name` AS `matching`, `match_field`.`match_type` AS `matching_type` FROM `date_profile_field` AS `field` LEFT JOIN `date_link_profile_field_match` AS `match_field` ON `field`.`profile_field_id`=`match_field`.`match_profile_field_id` LEFT JOIN `date_profile_field` AS `match_field_name` USING ( `profile_field_id` )"

Regards :)

02-06-2007, 02:39 PM
Don't use USING at any time. It isn't standard SQL.
name the tables.columns you are joining those tables on.

02-07-2007, 11:19 AM
so, the solutions is just delete the USING phrase?

02-07-2007, 07:31 PM
the solution is to remove the USING clause and use an ON clause with the appropriate columns named from both tables that you are joining on.