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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 16:58 Go to next message
martinb is currently offline  martinb   Canada
Messages: 2
Registered: May 2008
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 13:51 Go to previous message
martinb is currently offline  martinb   Canada
Messages: 2
Registered: May 2008
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Sun Oct 22 09:55:03 EDT 2017

Total time taken to generate the page: 0.00640 seconds