Sql error 1064, ASC LIMIT 0,15 [message #41071] |
Thu, 15 May 2008 20:58 |
martinb
Messages: 2 Registered: May 2008
Karma: 0
|
Junior Member |
|
|
Hi,
I install FudForum and Egroupware on my server. When i start fudforum via egroupware, i have the following error.
Database error: Invalid SQL: SELECT SQL_CALC_FOUND_ROWS egw_addressbook.*,account_lid,account_type,egw_accounts.account_id FROM egw_addressbook RIGHT JOIN egw_accounts ON egw_accounts.account_id=egw_addressbook.account_id WHERE contact_private=0 AND egw_addressbook.contact_owner=0 ORDER BY ASC
mysql Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 0,15' at line 1)
File: /usr/share/egroupware/etemplate/inc/class.so_sql.inc.php
Line: 734
Function: egw_db::select / so_sql::search / socontacts_sql::search / socontacts::search / accounts_backend::get_list / accounts::search / accounts::get_list
Session halted.
Martin
|
|
|
Re: Sql error 1064, ASC LIMIT 0,15 [message #41074 is a reply to message #41071] |
Fri, 16 May 2008 17:51 |
martinb
Messages: 2 Registered: May 2008
Karma: 0
|
Junior Member |
|
|
Correction for the bug
I find a correction for the fudforum bug in egroupware 1.4
In file class.so_sql.inc.php :
I replace the following line (675):
if ($order_by && stripos($order_by,'ORDER BY')===false && stripos($order_by,'GROUP BY')===false)
{
$order_by = 'ORDER BY '.$order_by;
}
by:
$strOrder = strlen($order_by);
if ($order_by && stripos($order_by,'ORDER BY')===false && stripos($order_by,'GROUP BY')===false)
{
$order_by = 'ORDER BY '.$order_by;
}
if ($strOrder == 4)
{
$order_by = '';
}
After the change, i can access in fudforum in egroupware 1.4
Martin
|
|
|