Page 1 of 1

problem with insert for Postgresql, please help.

Posted: Wed Dec 08, 2004 4:44 pm
by myleow
Has anyone encountered this problem before?

I perform an INSERTion and there weren't any complains
of error, so i assume that it has no error. When i
perform a SELECT there were 0 rows in the table.

This is just a simple table with (Integer,
Varchar(25),Varchar(50),Varchar(50)) type of data.

The error does not occur all the time, it only happens
once in a while.

Would appreciate if anyone can share their experience
and ways of getting around it with me.

Thank you in advance.

Mian

Posted: Wed Dec 08, 2004 4:48 pm
by myleow
The problem happened on another table too... Is there situation when we perform pg_close right after the a pg_exec operation causing this issue?

Would recompiling pgsql help on this situation? Seems to be a pgsql problem because it happened both from PHP and psql console.

Posted: Thu Dec 09, 2004 6:38 am
by CoderGoblin
Very hard to tell what the issue is with the information provided.

It is unlikely to be a pgsql problem, more likely to be a coding issue.

After the insert try a [pg_man]pg_affected_rows[/pg_man] to check if a row was really inserted.

Is your SELECT correct ?

Could we potentially see some of the code?

Posted: Fri Dec 10, 2004 10:33 pm
by myleow
I solved the problem. Its because the page that i was viewing the data from has a delete button to delete the row. When i refresh the page to look at the data again i didn't know the delete was sent again so making it look like the data is not being stored.

My mistake.