Re: PostgreSQL - PHP insert deleted from database immediately?

Поиск
Список
Период
Сортировка
От Ricardo Campos Passanezi
Тема Re: PostgreSQL - PHP insert deleted from database immediately?
Дата
Msg-id Pine.BSF.4.31L2.0104261148200.72340-100000@netuno.ige.unicamp.br
обсуждение исходный текст
Ответ на PostgreSQL - PHP insert deleted from database immediately?  ("Sami" <samihREM-ME@email.com>)
Список pgsql-general
...
> The insert statement executed from php is:
>
>      $otsikko = "Insert testi";
>      $teksti = "Koeteksti 1";
>
>      $sqllause = "INSERT INTO jutut (otsikko,teksti) VALUES ('";
>      $sqllause = $sqllause . $otsikko . "','" . $teksti . "');";

Have you tried without the ";"? Just like:

$sqllause = "INSERT INTO jutut (otsikko,teksti) VALUES ('";
$sqllause = $sqllause . $otsikko . "','" . $teksti . "')";


I have similar stuff around here, and it works just fine.

The piece of code I have:

$connect = pg_connect("host=$host dbname=$db user=$user password=$pass");
$insert_query = "INSERT INTO table(field1,field2,...,fieldN)
VALUES('$field1','$field2',...,'$fieldN')";

$result = pg_exec($connect,$insert_query);

pg_close($connect);

Obs: the $insert_query is defined in one line...

Ricardo.


В списке pgsql-general по дате отправления:

Предыдущее
От: will trillich
Дата:
Сообщение: crypt(table.field) ?
Следующее
От: "Gregory Wood"
Дата:
Сообщение: Re: help with serial type