Re: PHP and PostgreSQL

From: Date: Tue, 04 Jul 2000 18:43:09 +0000
Subject: Re: PHP and PostgreSQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4791@lists.php.net to get a copy of this message
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) corey On Tue, 4 Jul 2000, Joe Conway wrote: > >Hi, > > I am trying to do an insert into my postgreSQL database > >from a form. When I try to insert a null value, it gets > >put into the database as a string of spaces. Any ideas as to > >why and how to insert the correct null value? > > > >Corey Mosher > > > What does your table look like? What does your insert string look like? It sounds like you may > be inserting '' instead of null into a char field. > > Joe > > Corey Mosher Hub.Org Networking Services Wolfville, NS Canada corey@hub.org

« previous php.general (#4791) next »