select * from table not showing everything
select * from table not showing everything
От:
Richard Dunne <richarddunne1971@yahoo.com>
Дата:
I am using a php script via an xmlhttprequest to insert data into a postgresql table from a php web page form. before submitting the form data, I had 1 entry in my table. after submitting the form data, I ran a select * from table query which declared there were 2 entries in the table, but it only displayed the original entry. Is this a know issue? If this is not the corect forum for this post, please advise.
This is the code.
php web page
ALLIED AUTO PARTS
Choose from the following funtions |
|||||
| View Parts | Purchases | Sales | Add parts | Update Customer | Update Supplier |
Re: select * from table not showing everything
От:
John DeSoi <desoi@pgedit.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