Re: select * from table not showing everything

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




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



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux