[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix
- From: Florian Weimer <fw@...>
- Date: Wed, 03 Feb 2010 18:15:55 +0100
* Vasanta:
> I am getting an error:
>
> /bin/lua error loading module in file db.lua
>
> db.lua: 548 Unexpected symbol near '|'
>
> line 548 " insertPart = insertPart .. "\'" ..
> conn:escape(v)|, .. "\', "
>
> I repalced "v" with "conn:escape(v)|," is that correct?.
Sorry, there was a typo, the "|" is noise.
Regarding the value for conn, I think you may have to add
function db.escape(str)
return _DB_con:escape(str)
end
to your db package because there's no way to get at the _DB_con value
directly. After that, you can write "db.escape(v)" and so on.
- References:
- when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, noel frankinet
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Florian Weimer
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Florian Weimer
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Florian Weimer
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Florian Weimer
- Re: when I insert table, value is a string contains apostrophe - it throws an error there - how to fix, Vasanta