Re: [NOOB] try tu put a number with pqexecprepare

Поиск
Список
Период
Сортировка
Искать
От
elekis
Тема
Re: [NOOB] try tu put a number with pqexecprepare
Дата
Msg-id
78316ea80811280240w7ad5b056pc8b5a4646bd8285@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[NOOB] try tu put a number with pqexecprepare elekis <elekis@gmail.com>
Re: [NOOB] try tu put a number with pqexecprepare "Daniel Verite" <daniel@manitou-mail.org>
Re: [NOOB] try tu put a number with pqexecprepare elekis <elekis@gmail.com>
Re: [NOOB] try tu put a number with pqexecprepare Raymond O'Donnell <rod@iol.ie>
Re: [NOOB] try tu put a number with pqexecprepare elekis <elekis@gmail.com>
Re: [NOOB] try tu put a number with pqexecprepare "Serge Fonville" <serge.fonville@gmail.com>
Re: [NOOB] try tu put a number with pqexecprepare "Serge Fonville" <serge.fonville@gmail.com>
Re: [NOOB] try tu put a number with pqexecprepare "Daniel Verite" <daniel@manitou-mail.org>
hi, and thanks

something, I don't underdstand, a little research on google say to me
that htonl  and...is in

#include   a network stuff  is that normal that I have to
use that???

I just wanna put number in the db.(sniff)


thanks

a++




On Fri, Nov 28, 2008 at 11:23 AM, Daniel Verite  wrote:
>        elekis wrote:
>
>> I put the code here
>>
>> http://pastebin.com/m1860cc27
>>
>>
>> I symply try to put the number 5 for the second column, and after
>
> that
>>
>> read the line.
>>
>>
>> but the database, I have taht
>> 83886080 in place of 5.
>
> 83886080 happens to be ntohl(5), it's probably not a coincidence :)
>
> Since  you're using binary format for your integer parameters, you must
> convert them from host byte order to network byte order with htonl() and
> conversely use ntohl() for results.
>
> Best regards,
> --
> Daniel
> PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org
>



-- 
http://deathboater.blogspot.com/
В списке pgsql-general по дате отправления
От: Daniel Verite
Дата:
От: Raymond O'Donnell
Дата:
FAQ