Forums

1064 Syntax-Error with FAQ: Direct list editing

musico 02 Nov, 2015
Hello,
I followed the http://www.chronoengine.com/faqs/72-ccv5/5213-direct-list-editing.html with this code in the "fields-Box":
PONA.wu:<input type="text" name="PONA[{PONA.id}][wu]" value="{PONA.wu}" class="form-control A" size="30"/>


When testing the connection I receive this SQL-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 '.`wu}" class="form-control A" size="30"/>` AS `PONA.wu:<input type="text" name="' at line 1 SQL=SELECT `PONA`.`wu:<input type="text" name="PONA[{PONA`.`id}][wu]" value="{PONA`.`wu}" class="form-control A" size="30"/>` AS `PONA.wu:<input type="text" name="PONA[{PONA.id}][wu]" value="{PONA.wu}" class="form-control A" size="30"/>` FROM `tools_chronoengine_nachforschung` AS `PONA` WHERE PONA.Kunde = current_date() AND `PONA`.`joomla_id` = '714' ORDER BY `PONA`.`created` DESC LIMIT 100


Right now I'm using Xampp with MySQL 5.6.20 and PHP: 5.5.15 with Chronoconnectivity 5.0.1. Do I need a different SQL-Version? What's wrong with the code I try to use? Any help would be appreciated.

Thank you.
Tom
GreyHead 02 Nov, 2015
Hi Tom,

Are you sure that you have this in the Fields box and not in one of the others? It works OK when I test.

Bob
musico 02 Nov, 2015
Hi Bob,

thank you for your reply. Yes, it's in the Fields box. This is what I have in Models tab:

[attachment=0]PONA.PNG[/attachment]
musico 02 Nov, 2015
Do you have any suggestion how to get it work? Could it be a conflict with the code in the Conditions box?

Thank you for your help.

Tom
GreyHead 02 Nov, 2015
Answer
Hi Tom,

Please use the Fields box on the Front Listing (or Admin Listing) tab instead - I hadn't spotted that there were two of them.

The Models Tab one should just have the list of fields (columns) that you want to read from the database table.

Bob
musico 03 Nov, 2015
Hi Bob,

,,, and I didn't recognize that there is a second Fields box 🙄
I put the code in the right box and it works like a charm.

Thanks for the hint and the perfect support.

Regards
Tom
This topic is locked and no more replies can be posted.