Hi Bob,
I have a INSERT INTO in custom code that throws a 1064 Syntax Error when the user entry form field contains string like "Let's go", "I'll do it". It is the apostrophy. What would you recommend to handle such scenario?
How does chronoform handle it during DB Save?
Thanks,
kwok
I have a INSERT INTO in custom code that throws a 1064 Syntax Error when the user entry form field contains string like "Let's go", "I'll do it". It is the apostrophy. What would you recommend to handle such scenario?
How does chronoform handle it during DB Save?
Thanks,
kwok
Hi kowk,
Either use the ChronoForms DB Save action, or fix your custom code so that the values are correctly quoted. See the MySQL docs here for some examples.
Bob
Either use the ChronoForms DB Save action, or fix your custom code so that the values are correctly quoted. See the MySQL docs here for some examples.
Bob
Hi Bob,
I was trying to explore INSERT TO in chronoform environment. If it works "flawlessly", I wouldn't need to create form fields for all columns of the target table.
Now I totally agree that DB Save is more superior.
Thanks,
kwok
I was trying to explore INSERT TO in chronoform environment. If it works "flawlessly", I wouldn't need to create form fields for all columns of the target table.
Now I totally agree that DB Save is more superior.
Thanks,
kwok
Hi kwok,
You can use MySQL directly but then you have to get the syntax right. The ChronoForms + Joomla! methods require that the tables have a numeric auto-incremented primary key. If there is a valid key in the data then that record is updated, otherwise a new one is created - unless you use the Conditions box to over-ride that.
Bob
You can use MySQL directly but then you have to get the syntax right. The ChronoForms + Joomla! methods require that the tables have a numeric auto-incremented primary key. If there is a valid key in the data then that record is updated, otherwise a new one is created - unless you use the Conditions box to over-ride that.
Bob
This topic is locked and no more replies can be posted.