I'll be the first to admit this is a bit off-topic, and I'd happily listen to any suggestions of where else I should take this question (as long as it doesn't hurt :) )
My perl code has generated the following query, and all looks good to me:
select csGroups.ID as groupid,csUsers.UserName as username,csUsers.ID as id,csGroups_lang.Title as grouptitle from csGroups_lang,csUsers,csGroups,csUsers_Groups where csGroups.ID = csGroups_lang.ID and csUsers.ID = csUsers_Groups.UserID and csGroups.ID = csUsers_Groups.GroupID and (id IN (1,2)) order by username asc limit 0,10But the MySQL database i've connected to via dbi doesn't like it. It's reason:
Unknown column 'csUsers_Groups.UserID' in 'where clause'
I have verified that csUsers_Groups.UserID does indeed exist. Do any of you Perl/DB gurus know if you have to select a column from a table in order to be allowed to use the column in your where clause?
In reply to generated SQL statement problem (OT) by AidanLee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |