Hi All,
when I try to insert a lot of rows in a postgresql db with for loop php:

PHP Code:
function foo() {

    
$input = array('bar');

    
$db=connection_pgsql() or die('Connessione al DBMS non riuscita');
    for (
$i=0;$i<1000;$i++) 
    {

      echo 
$i;
      
pg_prepare"run","INSERT INTO tab1(name) VALUES  ($1)");
      
pg_execute("run",$input);

    }
   
    
pg_close($db);

In my db are stored only about 100 rows and not 1000 rows. echo $i print not all number from 0 to 1000 but it stops at random number < 1000