lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Vasanta a écrit :

you must double the inside quote quote in sql  : 'MFD''s web managment'

But query value string contains, like below, I got error:

query INSERT INTO eventLog ('component', 'facilityId', 'logLevel', 'textMessage', 'binMessage') VALUES ('UMI_COMP_PLATFORM', '3', '8', 'Tue Feb 2 21:18:52 2010 [Net MFD][System][PLATFORM] Reading Net MFD's web management interface 1', '')

errstr: LuaSQL: unrecognized token: "', '')"

******** table insert failed for eventLog

On Wed, Feb 3, 2010 at 8:09 AM, Florian Weimer < <>> wrote:

    * Vasanta:

    > *When I do INSERT like below, value is a string with apastrophe
    (for ex:
    > "Checking for 'hlt' instruction"), insert throws an error - how
    to fix?*

    Most SQL database access layers contain functionality which allows you
    to separate data from the query.  You should simply use that, and
    these problems go away.