Apostrophe and UPDATE

Paul Foraker paul.foraker at gmail.com
Wed Oct 9 23:03:54 CEST 2013


On Wed, Oct 9, 2013 at 7:02 AM, Dr. Hawkins <dochawk at gmail.com> wrote:

> You're using the wrong escape.
>
> Inside a string, you need a double single quote, not a backslash.
>
> It's worth keeping a preSql() function around, like:
>
> function preSQL pSQL
>     replace "'" with "''" in pSQL
>    if pSQL is empty then
>       return "NULL"
>    else
>       return "'" & pSQL & "'"
>    end if
> end preSQL
>


Thank you, Dr Hawkins. Problem solved. Now if I can just get my brain to do
an UPDATE.

-- Paul


More information about the use-livecode mailing list