Re: PHP and PostgreSQL

From: Date: Tue, 04 Jul 2000 19:05:24 +0000
Subject: Re: PHP and PostgreSQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4801@lists.php.net to get a copy of this message
I did the following select: select * from movie where review IS NULL; this doesn't return any rows and it should return all rows since all my entries have nothing in the review field. Corey On Tue, 4 Jul 2000, Teodor Cimpoesu wrote: > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > Corey Mosher Hub.Org Networking Services Wolfville, NS Canada corey@hub.org

« previous php.general (#4801) next »