The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Submission Account Login SQL Syntax Error - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16) +--- Thread: Submission Account Login SQL Syntax Error (/showthread.php?tid=816) |
Submission Account Login SQL Syntax Error - nickanthony - Aug 21st, 2010 When I try to login as a user to the Submission Account, I get this error: 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 'ORDER BY list_order' at line 4 Does anyone know what this means; and how and where I might address the problem? I did find the 'ORDER BY list_order' code in /global/code/admin.php; but not sure what to do with it. function sa_get_form_menu($form_id) { global $g_table_prefix; $menu_query = mysql_query(" SELECT * FROM {$g_table_prefix}module_submission_accounts_menus WHERE form_id = $form_id ORDER BY list_order "); $menu_items = array(); while ($row = mysql_fetch_assoc($menu_query)) $menu_items[] = $row; return $menu_items; } My server has MySQL version 5.1.47-community-log; and here is the ORDER BY in the manual - http://dev.mysql.com/doc/refman/5.1/en/order-by-optimization.html Thnx for any help, Nick RE: Submission Account Login SQL Syntax Error - Ben - Aug 22nd, 2010 Hey Nick, Hmm... is looks that function isn't being passed the $form_id, so it's choking on the next line when trying to run the (invalid) SQL. Do you know where is calling that function? Could you check it out to see if the $form_id is set? If not, let me know and I'll take a look. - Ben RE: Submission Account Login SQL Syntax Error - nickanthony - Aug 22nd, 2010 Hi Ben, I just typed the URL into my browser like this: http://gotzodiak.com/FormTools/modules/submission_accounts/login.php?form_id=1 Then when I type in my email and password, and click "login", I get the error. RE: Submission Account Login SQL Syntax Error - nickanthony - Aug 24th, 2010 Hi Again Ben, Solved - Rather than simply pasting the URL in my browser, I put a link to it on a web page. When I clicked on the link, and then entered the login info, it worked. I do not understand why pasting the url directly in my browser did not work - wish I knew. My apologies for wasting your time on a such a simple thing... Nick RE: Submission Account Login SQL Syntax Error - Ben - Aug 28th, 2010 No no, not at all. That *is* odd... maybe there was a problem copying and pasting the content into your browser? Strange! Glad it's working now, though. And it's good to know about the error message: that should never occur, so I'll have to patch that. - Ben |