Файл: bve/basetest.php
Строк: 24
<?php
ini_set('max_execution_time',0);
error_reporting (-1);
$bv_start=microtime(1);
ini_set('display_errors',1);
//$login="Adminmmfermaru";
//////
$y=0;
$dbv=$y;
$hst='localhost';
$nm='atest';
$ps='testa';
$usr='atest';
open_DB();
if(!$dbv) exit('-=404=-');
$sql="SELECT idu FROM mferma ";
$result=mysqli_query($dbv,$sql);
if (!$result) {echo "bad request"; exit('-=13=-');}
while ($row = mysqli_fetch_assoc($result)) {
$y++;
$iduser=$row['idu'];
echo "<br>|# $y | User: $iduser | ".(sprintf("%.4f",(microtime(1)-$bv_start)));
$mailtime=@date("Y-m-d H:i:s");
$sql2="UPDATE mferma SET mail='$mailtime' WHERE idu='$iduser' ";
$r=mysqli_query($dbv, $sql2);
/////if($y > 10000) exit('<hr>-=Abort=-');
}
echo "<hr>|".(sprintf("%.4f",(microtime(1)-$bv_start)))."| Nice Work!";
exit('-============-');
//-------------------------------------------------------------------
function open_DB() {global $dbv,$hst,$ps,$nm,$usr; $dbv=new mysqli($hst,$usr,$ps,$nm); if (mysqli_connect_errno()) exit('-=911=-'); $dbv->select_db($nm); unset ($ps,$hst,$nm,$usr); return; }
////
?>