Hi...
I'm having trouble with my postgresql function and i'm using php script to access the function. I want to insert data into a table that consists of 25 columns through the function. But i only have two columns/fields in my php script that will insert into the table and the rest columns/fields are inserted through the function itself (inserted from the value of another tables).
Here is my pgsql function : (see attachment plankandua.sql in ricky.zip)
The two fields/columns that inserted into the work_planned table which i mentioned above is order_no and sub_itemno. And the rest fields/columns is inserted from another tables by calling and storing them in the function.
And here is my php code : (see attachment inscust.php and insert.php in ricky.zip)
When i press the submit button in inscust.php, it returned an error :
" ERROR: syntax error at or near "VALUES" LINE 1: SELECT plankandua (order_no, item_no) VALUES ('1-2010-117','... ^ SELECT plankandua (order_no, item_no) VALUES ('1-2010-117','2.2') "
Thanks for any help. If you any information or any data, please let me know.
Ricky
I'm having trouble with my postgresql function and i'm using php script to access the function. I want to insert data into a table that consists of 25 columns through the function. But i only have two columns/fields in my php script that will insert into the table and the rest columns/fields are inserted through the function itself (inserted from the value of another tables).
Here is my pgsql function : (see attachment plankandua.sql in ricky.zip)
The two fields/columns that inserted into the work_planned table which i mentioned above is order_no and sub_itemno. And the rest fields/columns is inserted from another tables by calling and storing them in the function.
And here is my php code : (see attachment inscust.php and insert.php in ricky.zip)
When i press the submit button in inscust.php, it returned an error :
" ERROR: syntax error at or near "VALUES" LINE 1: SELECT plankandua (order_no, item_no) VALUES ('1-2010-117','... ^ SELECT plankandua (order_no, item_no) VALUES ('1-2010-117','2.2') "
Thanks for any help. If you any information or any data, please let me know.
Ricky