Re: PHP and PostgreSQL

From: Date: Tue, 04 Jul 2000 18:59:23 +0000
Subject: Re: PHP and PostgreSQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-4797@lists.php.net to get a copy of this message
Hi Corey! On Tue, 04 Jul 2000, Corey Mosher wrote: > the table looks like this: > > mid serial, > title text, > year text, > review text > > the query looks like this: > $query = "INSERT INTO movie (title, year) VALUES ('$title', > '$year')"; > > This should put a null value in review, however, it puts a string of > spaces. eg. > > movie=> select '[' || review || ']' from movie where oid = <the oid > num>; > ?column? > ---------- > [ ] > (1 row) sorry, sow your post just after replied the previous one. I think Postgres did a typecast to string because of the string concatenation. What gives "select ifnull(review,'NULL this one') from movie ;" ? -- teodor

« previous php.general (#4797) next »