Re: libpq prepared statement
Re: libpq prepared statement
- Subject: Re: libpq prepared statement
- From: Keary Suska <email@hidden>
- Date: Mon, 31 Mar 2008 14:24:58 -0600
- Thread-topic: libpq prepared statement
on 3/31/08 1:44 PM, email@hidden purportedly said:
> PQprepare *statement = PQPrepare(theConnection, "stmtname", "SELECT *
> FROM admin WHERE id = %s", 1, [theUUID]);
Yes--it not even close. The libpq prototype is:
PGresult *PQprepare(PGconn *conn,
const char *stmtName,
const char *query,
int nParams,
const Oid *paramTypes);
It also looks like you are confusing regular C with Objective-C
(syntactically). Libpq is a C library, so constructs such as PGresult are
pointers, *not* objects. If you don't know C very well, you really should
brush up on it. It will also help your Cocoa, since Objective-C is a
superset of C.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden