pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John DeSoi <desoi@pgedit.com>
To: Richard Dunne <richarddunne1971@yahoo.com>
Cc: Lista PG-PHP <pgsql-php@postgresql.org>
Subject: Re: select * from table not showing everything
Date: Sat, 28 Apr 2007 10:50:38 -0400
Message-ID: <D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com> (raw)
In-Reply-To: <99437.76872.qm@web50303.mail.re2.yahoo.com>
References: <99437.76872.qm@web50303.mail.re2.yahoo.com>


On Apr 28, 2007, at 10:09 AM, Richard Dunne wrote:

> $result=pg_query($connect, "insert into customer values 
> ('$customer_name', '$customer_address', '$customer_contact_no')");

Are these really the first columns in the customer table? If not, you  
need to specify the target columns in the insert, e.g.

insert into customer (customer_name, customer_address,  
customer_contact_no) values ('$customer_name', '$customer_address',  
'$customer_contact_no')

Even if these are the first columns, it is not a good idea to leave  
the column specs out since your code will break if you change the  
table in an incompatible way.





John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL




view thread (4+ messages)  latest in thread

Message-ID: <D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com>
Permalink:  ../D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com/
Also on:    postgresql.org/message-id/D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: desoi@pgedit.com, richarddunne1971@yahoo.com
  Subject: Re: select * from table not showing everything
  In-Reply-To: <D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com>
  References: <99437.76872.qm@web50303.mail.re2.yahoo.com> <D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox