Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >libpq prepared statement (From: Justin Giboney <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.