FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Submission Account Login SQL Syntax Error
#1
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/o...ation.html


Thnx for any help, Nick
Reply
#2
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
Reply
#3
Hi Ben,

I just typed the URL into my browser like this:

http://gotzodiak.com/FormTools/modules/s...?form_id=1

Then when I type in my email and password, and click "login", I get the error.
Reply
#4
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
Reply
#5
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)