Skip site navigation (1) Skip section navigation (2)

Re: wouldn't insert

From: brew(at)theMode(dot)com
To: "Elijah O(dot) Alcantara" <elijah(at)asti(dot)dost(dot)gov(dot)ph>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: wouldn't insert
Date: 2004-07-09 19:08:12
Message-ID: Pine.BSF.4.58.0407091459400.2007@themode.com (view raw or flat)
Thread:
Lists: pgsql-php
Elijah.....

> There are no errors whatsoever, must be something wrong with the logic
> somewhere...

What I do when I can't find errors is break down the code into
smaller steps and add error checking.

Make the connection and check the return value.

Put together the sql statement and print it.

Query the database and check the return value.

and so forth.....

Check php.net to see some examples of error checking.

On another note, if I'm only working with only one db I just connect once
near the start of the script and then use that connection for the
subsequent calls.

brew

 ==========================================================================
                  Strange Brew   (brew(at)theMode(dot)com)
     Check out my Musician's Online Database Exchange (The MODE Pages)
                        http://www.TheMode.com
 ==========================================================================


In response to

Responses

pgsql-php by date

Next:From: ChrisDate: 2004-07-11 23:42:23
Subject: Re: wouldn't insert
Previous:From: Bruno Wolff IIIDate: 2004-07-09 15:27:22
Subject: Re: [PHP] Secure DB Systems - How to

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group