I'm writing a code with this function:
function foo() {
$input = array('bar');
for ($i=0;$i<1000;$i++) {
$db=connection_pgsql() or die('Connessione al DBMS non riuscita');
pg_prepare( "run","INSERT INTO tab1(name) VALUES ($1)");
pg_execute("run",$input);
pg_prepare( "run","INSERT INTO tab2(name) VALUES ($1)");
pg_execute("run",$input);
pg_prepare( "run","INSERT INTO tab3(name) VALUES ($1)");
pg_execute("run",$input);
pg_close($db);
}
}
After the execution of this function there are only
20 rows in tab1, 20 rows in tab2 and 20 rows in tab3
and not
1000 rows in tab1, 1000 rows in tab2 and 1000 rows in tab3.
Is it a problem of php or postgresql configuration?