Hi.

I am trying to do a interface from a web over my database postgresql
whit libpq.

I can't do a simple 'insert' from libpq.

I'm doing this:

sprintf(temp_string,"insert into clientes  
values('fff','prueba','123','123','pepe gotera','jjjjjj','jjj')");
       
res1=PQexec(conn,temp_string);
tuplas=PQresultStatus(res1);
imprime_cab_html(0);

printf("Resultado: %s<br><p>\n",PQresStatus(tuplas));
printf("Temp_string: %s\n",temp_string);


*****

And the result on my web it's OK:

Resultado: PGRES_COMMAND_OK

Temp_string: insert into clientes
values('fff','prueba','123','123','pepe gotera','jjjjjj','jjj')


But the insert hasn't effect on my database. If from my database i do
'select * from clientes;' the result it's empty.


Where it's the problem?.

Thanks in advanced.

************

Reply via email to