Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1.                                 <?php
  2.                                 $host = "127.0.0.1";
  3.                                 $dbuser = "root";
  4.                                 $dbpass = "ascent";
  5.                                 $dbname = "auth";
  6.                                 $conn = mysqli_connect($host, $dbuser, $dbpass, $dbname);
  7.  
  8.                                 $status= 1;
  9.  
  10.                                 $stmt = $conn->prepare("SELECT * FROM account");
  11.                                 $stmt->bind_param("i", $status);
  12.                                 $stmt->execute();
  13.                                 $stmt->bind_result($charname);
  14.                                 $stmt->store_result();
  15.                                   if($stmt->num_rows > 0) {
  16.                                     while($stmt->fetch()) {
  17.                                       echo $stmt->num_rows;
  18.                                                 }
  19.                                 }
  20.                                 ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement