Re:
От | MUKTA |
---|---|
Тема | Re: |
Дата | |
Msg-id | 00f301c3e672$5dbf1550$ea08a8c0@mukta обсуждение исходный текст |
Ответ на | ("MUKTA" <muktavasudeva@hfcl.com>) |
Список | pgsql-sql |
Hi!!
wow, ur help was extremely helpfull! thanx a bunch! i just joined this pgsql project 2 days ago so i dunno bout php etc, i guess i wont need to use the ecpg stuff for now..
Thanx a lot!
Bye
PS: how did u know i was an artist! :)
----- Original Message -----From: Viorel DragomirSent: Thursday, January 29, 2004 6:41 PMSubject: Re: [SQL]So, you are an artist. Isn't it? :)Your query is actually a string.This is your string: INSERT into table values(a,b,c,d)You must change your string to actually use values of tha a, b...You can make this string with sprintfsprintf(string, "INSERT into table values(%d,%d,%d,%d)", a, b, c, d);Then you launch:res=PQexecute(Conn, string);Why don't you use PHP? Is easier.Have a nice day----- Original Message -----From: MUKTASent: Thursday, January 29, 2004 15:08Subject: [SQL]Hi I have an urgent problemI want to insert values into a table using the C syscalls provided by the libpq library, but i find that i can not insert into the table when i use variables instead of values...like so:int a,b,c,d;using the C functionres=PQexecute(Conn,"INSERT into table values(a,b,c,d));....executing above statement with plain integers does fine and inserts them into table..Is there some special way to insert variables rather than plain values? do i have to build functions (in sql) or somehting?help!Thanx
В списке pgsql-sql по дате отправления: