PostgreSQL - PHP insert deleted from database immediately?
| От | Sami | 
|---|---|
| Тема | PostgreSQL - PHP insert deleted from database immediately? | 
| Дата | |
| Msg-id | 9c38bj$30r$1@tron.sci.fi обсуждение исходный текст  | 
		
| Ответы | 
                	
            		Re: PostgreSQL - PHP insert deleted from database immediately?
            		
            		 | 
		
| Список | 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?
		
	В списке pgsql-general по дате отправления: