FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » FUDforum in eGroupWare » Sql error 1064, ASC LIMIT 0,15 (Bug)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Sql error 1064, ASC LIMIT 0,15 [message #41071] Thu, 15 May 2008 20:58 Go to next message
martinb is currently offline  martinb   Canada
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 Go to previous message
martinb is currently offline  martinb   Canada
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Nouvelle version du manuel d'utilisateur v.1.02 pour eGroupWare v.1.4.002
Next Topic: automatic notification e-mail to new task members
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 11:43:27 GMT 2024

Total time taken to generate the page: 0.02745 seconds