当前位置: 首页 > 工具软件 > txtSQL > 使用案例 >

txtcms----txtSQL1.0运行成功

岳正阳
2023-12-01

bpkLie  md5加密后为 9ccb7a50a245d5c32804619267a21dac

 

txtsql.myi文件内容为:

a:1:{s:4:"root";s:32:"9ccb7a50a245d5c32804619267a21dac";}

 

test.php文件内容为:

<?php
include('./timer.php');
$timer = new Timer();
$timer->start();
//=========================================================
include('./txtSQL.php');
$sql = new txtSQL('./data');
$sql->connect('root','bpkLie');
$results = $sql->query('SELECT * FROM test.test ORDER id ASC');
while ( $row = $sql->fetch_array($results) )
{
    $rows[] = $row;
}
print_r($rows);
//=========================================================
echo '<hr>'.$timer->finish().$timer->getTime() . ' Seconds To Execute';
?>           
      
 

浏览器里运行结果为:

Array ( [0] => Array ( [id] => [name] => Faraz ) [1] => Array ( [id] => 1 [name] => Ataurrasool ) [2] => Array ( [id] => 2 [name] => Salman ) ) 0.00301 Seconds To Execute

 类似资料: