[08] Error for wrong table

adykstra

New member
Running into a 08 error. I can see the issue with the query (no ` around the second name in the ORDER BY clause), but I don't know where to correct the error. The error happend when opening the insert a new item form for a table called publishers. Didn't show the form to insert a new row in the publishers table, just shows the error.

I've got $debug_mode = 1, $display_sql = 0. Every other table works fine. The publishers table is not exceptional in any way. No spaces in column names or table names. Searching the forum turned up great ideas, but nothing matching my situation.

Any suggestions?

Andrew

You are using DaDaBIK version 6.3 PRO, installed on 04-16-2015, the last version of DaDaBIK is 6.3 released on 12-22-2014

You are runnning the last release of DaDaBIK

PHP Version: 5.5.9-1ubuntu4.4

mysql version: 5.5.38-0ubuntu0.14.04.1

Web server: Apache

Client: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko





[08] Error: during query execution. SELECT `name`, `name` FROM `countries` WHERE (1 = 1) ORDER BY `name` name
The DBMS server said: SQLSTATE[42000]: Syntax error or access violation: 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 'name' at line 1
 

eugenio

Administrator
Staff member
Hi,
the weird thing is, first of all, the select statement which selects twice the field "name", do you know why?
It seems to me there is something wrong in the form configurator settings ... I guess you have a country field in the publisher table?
Is the application online?

Cheers,
 

adykstra

New member
Ha! Perfect! I understand how things are put together now.

It was indeed a problem with form configurator settings. The publications table has a lookup to the country table and I'd made a mistake of putting a column name in the sort order rather than ascending or descending.

The app was online the whole time - no hard faults. I corrected my mistake and now all is well.

I appreciate your fast response!

Thank you,
Andrew
 
Top