Apostrophe and UPDATE

Paul Foraker paul.foraker at gmail.com
Wed Oct 9 16:06:11 EDT 2013


On Wed, Oct 9, 2013 at 1:32 AM, stephen barncard <
stephenREVOLUTION2 at barncard.com> wrote:

> > Stephen,  escaping the single quote with another quote causes the same
> > error, with the result showing \'\' instead of \'.  I tried it with and
> > without variable substitution.
> >
>
> thanks, Paul. This goes in my Script Scrapbook.


Turns out I wasn't thinking clearly last night. My test for wrapping the
variable names seemed to work but the error checking was flawed. The SQL
that got executed included the variable name tID instead of the value, so
MySQL returned a 0 -- no rows updated. The error checking didn't acount for
that. When I replaced the variable name with the actual ID, the row got
updated with all the variable names. So, that little script is broken.

--
Paul



More information about the use-livecode mailing list