lua-users home
lua-l archive

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


On Tue, 17 Jun 2008 14:43:46 +0200
"daniel rahmeh" <daniel.rahmeh@gmail.com> wrote:

> my original query is: Insert into sometable (username, password,
> phone) values ('test', 'tespasswd', '123456789')
> 
> i want my query to be modified to: Insert into sometable (username,
> password, phone) values ('test', SHA1('tespasswd'), '123456789')
maybe something like this:
res = query:gsub("values%s*%('[^']*',%s*%(('[^']*')%)", "SHA1(%1)");