代码拉取完成,页面将自动刷新
<?php
include 'Db.php';
$config = [
'master' =>[
'host' => '127.0.0.1',
'dbname' => 'mysql',
'username' => 'root',
'password' => 'dream',
'port' => '3306',
],
'slaves' =>[[
'host' => '127.0.0.1',
'dbname' => 'mysql',
'username' => 'root',
'password' => 'dream',
'port' => '3306',
]],
];
$db = \Core\Db::getInstance($config);
//$data = $db->table('help_topic')->rows('select * from help_topic limit 2;select * from help_topic limit 1;');
//$data = $db->table('help_topic')->single('select * from @table limit 2;',null,null);
//$data = $db->table('help_topic')->rows('select 1; select 2; select 3; select 4;');
//$data = $db->table('help_topic')->limit(1)->get();
//$data = $db->table('help_topic')->where('[#]help_topic_id+1 =1')->get();
//$res = $db->table('help_topic')->where('[#]help_topic_id+1 =1');
$res = $db->table('help_topic')->where('[#]help_topic_id =10');
$data = $res->explain();
$cnt = $res->count('help_topic_id');
print_R($data);
print_R($cnt);
//echo $db->debugDumpParams();
//print_R($data);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。