首页 > 代码库 > $w=$mysqli->query($sql);
$w=$mysqli->query($sql);
1 $db = new mysqli(‘localhost‘, ‘root‘, ‘‘, ‘w‘); 2 if($db->connect_error){ 3 die(‘Connect Error ( ‘.$db->connect_errno.‘ )‘.$db->connect_error); 4 } 5 echo ‘Connect OK.<br>‘; 6 $wtab = ‘w‘.rand(123,987); 7 $w = $db->query("CREATE TABLE $wtab (w int)"); 8 var_dump($w); 9 $w = $db->query("INSERT INTO $wtab VALUES(123)");10 var_dump($w);11 $w = $db->query("SELECT * FROM $wtab");12 var_dump($w);
Connect OK.D:\wamp64\www\wdb.php:21:boolean falseD:\wamp64\www\wdb.php:23:boolean trueD:\wamp64\www\wdb.php:25:object(mysqli_result)[3] public ‘current_field‘ => int 0 public ‘field_count‘ => int 1 public ‘lengths‘ => null public ‘num_rows‘ => int 2 public ‘type‘ => int 0
$w=$mysqli->query($sql);
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。