lua-users home
lua-l archive

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

Thanks a lot, appreciated, let me add this, also let me delete "|", it should look like "conn:escape(v)," instead "v" right?.

On Wed, Feb 3, 2010 at 12:15 PM, Florian Weimer <> wrote:
* 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)

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.