TAB view:
- All users
Problem occurs:
When slecting a user defined group from the drop down menu. (In this case, 'Family'. The group does appear as an check box option when creating a new listing). The three default items work properly.
What happens:
I get the following message:
"The Address Book has encountered a problem.
MySQL returned the following error message:
MySQL error number 1054: Unknown column 'contact.id' in 'on clause'"
(Addressline in the browser shows: http://www.billcliff.ne/addressbook/list.php?groupid=3\)
Your programming is excellent, by the way - this is a FANTASTIC addressbook. I have a couple of feature requests to suggest - will post seperately :-)
Regards,
Morten Billcliff
morten@billcliff.net
Logged In: NO
The problem depends on mysql 5.
To fix it you need to adapt lib/class-contactlist.php to the new left join syntax wich requires parenthesis around table names.
At line 101 change:
FROM " . TABLE_CONTACT . " AS contact";
to
FROM (" . TABLE_CONTACT . " AS contact";
At line 107 change:
$sql_group = " LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
to
$sql_group = ") LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
At line 112 change:
$sql_group = " LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
to
$sql_group = ") LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
At line 118 change:
$sql_group = " LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
to
$sql_group = ") LEFT JOIN " . TABLE_ADDRESS . " AS address ON contact.id=address.id AND contact.primaryAddress=address.refid
And finally at line 123 change:
$sql_group = ", " . TABLE_GROUPS . " AS groups
to
$sql_group = ", " . TABLE_GROUPS . " AS groups)
this is a very raw and dirty hack, but it's better than nothing.