lua-users home
lua-l archive

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



On Apr 02, 2007, at 09:32, eugeny gladkih wrote:

local stmt = conn:statement( "SELECT a, b, c FROM t WHERE d > $d AND e = $e" )
local rs, count = stmt:selectResultSet( { d=1; e="abc" } )

Well... you could as well use one statement...

local aConnection = DB( 'postgress://user:password@localhost' )
local aResult = aConnection( 'select a, b , c from t where d >', d, ' and e = ', e )

for aRow in aResult do
    print( aRow.a )
end