Re: select * from table not showing everything

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Richard Dunne <richarddunne1971(at)yahoo(dot)com>
Cc: Lista PG-PHP <pgsql-php(at)postgresql(dot)org>
Subject: Re: select * from table not showing everything
Date: 2007-04-28 14:50:38
Message-ID: D089E2FF-1A68-4166-895B-AB4C738C7AB8@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


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

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Richard Dunne 2007-04-28 20:45:11 Fw: select * from table not showing everything
Previous Message Richard Dunne 2007-04-28 14:09:14 select * from table not showing everything