lua-users home
lua-l archive

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


* 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.