Re: select * from table not showing everything

John DeSoi <[email protected]>
Newsgroups gmane.comp.db.postgresql.php
Message-ID <[email protected]>
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


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.