From: | "Sami" <samihREM-ME(at)email(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | PostgreSQL - PHP insert deleted from database immediately? |
Date: | 2001-04-24 07:04:17 |
Message-ID: | 9c38bj$30r$1@tron.sci.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, I'm trying to insert data from a php-page. The connection is open and
select-functions work perfectly. The problem is that an insert will - as far
as I know - insert the data and then immediately erase it.
The insert statement executed from php is:
$otsikko = "Insert testi";
$teksti = "Koeteksti 1";
$sqllause = "INSERT INTO jutut (otsikko,teksti) VALUES ('";
$sqllause = $sqllause . $otsikko . "','" . $teksti . "');";
ECHO $sqllause;
$tulos = pg_exec ($db,$sqllause);
if (!$tulos) {
echo "Sql-insert error.\n";
exit;
}
This results are the following in the web-browser:
INSERT INTO jutut (otsikko,teksti) VALUES ('Insert testi','Koeteksti
1');
Which when copied into the psql-console indeed does the insert correctly.
The reason I know the PHP-insert is done, but deleted is derived from the
fact that an automatically incremented index in the table is incremented
when the php-script is executed.
I get no error messages.
Could someone please help?
From | Date | Subject | |
---|---|---|---|
Next Message | will trillich | 2001-04-24 07:08:50 | Re: Re: BETWEEN clause |
Previous Message | eric07 | 2001-04-24 05:11:55 | configure on a P4? |