Hi,
I have a problem with populating a PostgreSQL Array with the contents of a PHP Array.
My PHP Array is in a while loop as follows:
while($x = each($one))
{
for ($row = 0; $row < count($iteration); $row++){
echo $x[1];
}
}
This code is part of a script to create checkboxes dependant on the number of rows in a particular table, and this works okay.
The problem I have is trying to insert the values of the checkbox into a postgres Array.
I have followed the sal_emp example on the postgres site, and from the backend, I can submit an insert as follows:
insert into job_contact(job_contact_id, job_sheet_id, contact_id) values (nextval('jc_seq'),'119','{100,200,300,400}');
The problem I have is that PHP will not allow me to do this, do I have to delimit the curly braces? or create some sort of loop on the insert statement? Apologies for lengthly post, any help greatly appreciated.
Matt.