php打印数据库语句 php 打印数据
请教大神thinkphp5 怎么打印sql语句
你好,一共有两种方法可以打印sql语句,具体实桐羡携现方法局伏可参照这篇文章:
创新互联是一家专注于网站制作、成都网站建设与策划设计,瓯海网站建设哪家好?创新互联做网站,专注于网站建设10年,网设计领域的专业建站公司;建站业务涵盖:瓯海等地区。瓯海做网站价格咨询:13518219792
ThinkPHP5打印sql语句
[ SQL ] SHOW COLUMNS FROM `think_action` [ RunTime:0.001339s ]
[ EXPLAIN : array ( 'id' = '1', 'select_type' = '派数SIMPLE', 'table' = 'think_action', 'partitions' = NULL, 'type' = 'ALL', 'possible_keys' = NULL, 'key' = NULL, 'key_len' = NULL, 'ref' = NULL, 'rows' = '82', 'filtered' = '100.00', 'extra' = NULL, ) ]
[ SQL ] SELECT * FROM `think_action` LIMIT 1 [ RunTime:0.000539s ]
PHP:打印SQL语句
$sql = "insert into db(id,name) values('昌拿做敏余$id','耐衡$name')";
echo $sql;
写一个php查询语句并找打印出来
?php
$db_host='启伏localhost';
$db_name='test123';
$db_user='test123';
$db_psd='test123';
mysql_connect($db_host,$db_user,$db_psd);
mysql_select_db($db_name);
$sql="select * from `group`"隐旁闷;
$res=mysql_query($sql);
if($resmysql_num_rows($res)0){
$row=mysql_fetch_assoc($res);
}
echo ($row['title'灶弯]);
?
分享标题:php打印数据库语句 php 打印数据
文章转载:http://cdiso.cn/article/ddppojj.html