Re: Newbie problem with from database in C

[email protected]
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <W7951027752238411211179677@webmail39>
-----Original Message-----
From: Jonah H. Harris [mailto:[email protected]]
Sent: Sunday, May 18, 2008 09:52 PM
To: [email protected]
Cc: [email protected]
Subject: Re: [INTERFACES] Newbie problem with from database in C

On Sun, May 18, 2008 at 9:13 PM,  wrote:> characters are fine so far. I have placed the code I am using below.> Would appreciate it if someone could tell me what is wrong or provide me> with a reference on how to do this properly.
 IIRC, you need to convert from network byte order:
idno = ntohl(*((int32 *) PQgetvalue(result, row, 0)));

after adding this code line I get
client3z.c:140: warning: assignment makes pointer from integer without a cast

I also added 
#include <endian.h>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.