wouldn't insert
От
Elijah O. Alcantara
Тема
wouldn't insert
Дата
Msg-id
1089340768.18180.9.camel@Falcon
Список
Дерево обсуждения
wouldn't insert "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Re: wouldn't insert "Chris" <chris@interspire.com>
Re: wouldn't insert brew@theMode.com
Re: wouldn't insert "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Re: wouldn't insert "Chris" <chris@interspire.com>
Re: wouldn't insert "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Re: wouldn't insert "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Resource id #12 "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Re: Resource id #12 Andrew McMillan <andrew@catalyst.net.nz>
Re: Resource id #12 "Elijah O. Alcantara" <elijah@asti.dost.gov.ph>
Re: Resource id #12 Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Resource id #12 Lynna Landstreet <lynna@gallery44.org>
Re: Resource id #12 "Scott Marlowe" <smarlowe@qwest.net>
Re: wouldn't insert "Scott Marlowe" <smarlowe@qwest.net>
Hi again,
Can someone help me out on this? the function I quoted below is supposed
to restore the values from table temp_contactinfo to contactinfo. But
it's not inserting to the contactinfo table...
There are no errors whatsoever, must be something wrong with the logic
somewhere...
> function restore_contactinfo($connectGovPH, $ctrl_no) {
>
> $query_clear = "delete from contactinfo where ctrl_no = '$ctrl_no'";
> pg_Exec($connectGovPH,$query_clear);
>
> $query = "select * from temp_contactinfo where ctrl_no = '$ctrl_no'";
> $result = pg_Exec($connectGovPH,$query);
> $num = pg_NumRows($result);
>
>
> for($i=0;$i<$num;$i++) {
> $row = pg_Fetch_Object($result,$i);
> $category = $row->category;
> $contact_no = $row->contact_no;
> $contact_name = $row->contact_name;
> $organization_name = $row->organization_name;
> $address = $row->address;
> $telephone = $row->telephone;
> $fax = $row->fax;
> $email = $row->email;
>
> $query2 = "INSERT INTO contactinfo
> VALUES('$ctrl_no','$category','$contact_no','$contact_name','$organization_name','$address','$telephone','$fax','$email')";
> pg_Exec($connectGovPH,$query2);
>
> $query3 = "DELETE FROM temp_contactinfo WHERE ctrl_no =
> '$ctrl_no' AND category = '$category' AND contact_no = '$contact_no'";
> pg_Exec($connectGovPH,$query3);
> }
> }
I've searched and searched but couldn't find anything wrong with the
code =(
Elijah
В списке pgsql-php по дате отправления