Page 1 of 1

SQL error on pasted text

Posted: Wed Aug 22, 2018 11:08 am
by Zood
Hey all

I've encountered a slight problem.
Each time I try to enter pasted text into my database I get an error:
"Syntax error: (The entire pasted text)"

All my pasted text is originally from e-mails I received so perhaps it is about unrecognised layout?
I did try to do the following:

Code: Select all

Set the htmltext of field "Text" to field "Text"
This I did in order to strip out any html-conversion, There is no need to keep the original layout from the email.

Any ideas on how to fix this?
Thanks in Advance!

Re: SQL error on pasted text

Posted: Wed Aug 22, 2018 11:50 am
by bangkok
Thank you to provide the script that inserts/updates the data into your mysql database, otherwise we are blind.

Furthermore, an example of one of those failed queries would be useful.

Last but not least, do you remove.... quotes from the data ?

Re: SQL error on pasted text

Posted: Wed Aug 22, 2018 2:44 pm
by MaxV
to strip out html use this:

Code: Select all

put the text of field "text" into field "text"
Then you have to escape all apostrophes:

Code: Select all

 put the text of field "text" into temptext
put replaceText(temptext,"'","''") into temptext
set the text of field "text" to tempText


Now you can use a query