<?php
/*
Bare bones, no extra connection or result checking, tried to mostly stick with the code example from php.net/mysql_query() \
*/

global $link;

//$link = mysqli_connect("localhost", "my_user", "my_password", "world");
$link mysql_connect("localhost""root""r00tz00");
if (!
$link) {
   die(
'Could not connect: ' mysql_error());
}
mysql_select_db("test",$link);

function 
DoInsert($sql) { // Interested this function's "own execution time"
    
global $link;
    
mysql_query($sql,$link);
    echo 
mysql_error($link);
}

/* Insert 100,000 rows */
for ($i=0;$i<100000;$i++) {
    
DoInsert("INSERT INTO `BENCHMARK` (FOO,DUMMY1,DUMMY2,DUMMY3) VALUES ('abcd','efgh','01010101000','mnop')");
}

mysql_query("TRUNCATE TABLE `BENCHMARK`",$link);

?>