Re: help !!!

Поиск
Список
Период
Сортировка
От apellido jr., wilfredo p.
Тема Re: help !!!
Дата
Msg-id 003301c45f71$8187cb80$8616b1cb@cache
обсуждение исходный текст
Ответ на help !!!  ("apellido jr., wilfredo p." <apellido@mactan.ph>)
Список pgsql-interfaces
Hello Sir, thanks for reply.  Im just testing what you said and i got thiserror:

Enter Username:  apellidoUsername :  apellidoGrade : (null)

-----------------------------my code:


double    i;
char       *reply_string;

reply_string = PQgetvalue(res, 0, 1); i = strtod(reply_string,NULL)/2.0;


Sir, i know that PQgetvalue(res, 0, 1); will return number although it isdeclare in the field varchar. Im already test

int i;                (also  tried unsigned short int)

reply_string = PQgetvalue(res, 0, 1);i = strtoul(reply_string,NULL, 3)/2.0;

Still i got the same error...  Im googling how to convert ascii to integerand i saw another question which confused me:
hereit is
 



Is there a command that can be used to temporarily convert a string value ina field to integer?

I.E.

SELECT name, employeeidFROM usersWHERE employeeid = bob

In this case employeeid is an integer, and bob is a number but stored as astring.  how do you temporarily convert bob
toan integer for the sake ofthe comparison?
 





В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: help !!!
Следующее
От: Matt Palmer
Дата:
Сообщение: unsubscribe