Re: Simple PostgreSQL client library
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Simple PostgreSQL client library
- From: eugeny gladkih <john@...>
- Date: 2007年4月02日 11:32:57 +0400
>>>>> "MB" == Michael Broughton <mbobowik@telusplanet.net> writes:
MB> Anyway, here is an example of a basic query using my library:
MB> local stmt = conn:statement"SELECT a, b, c FROM t WHERE d > 1ドル AND e = 2ドル"
MB> stmt:setInteger(1, 1234)
MB> stmt:setString(2, "abcd")
MB> local rs, count = stmt:selectResultSet()
what about more flexible idea - using separate statement and
bindings?
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" } )
--
Yours sincerely, Eugeny.
Doctor Web, Ltd. http://www.drweb.com