SHARE
TWEET

Untitled

a guest Dec 31st, 2018 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $SQLhost='sub.domain.net';
  2. $SQLuser='user';
  3. $SQLpass='password';
  4. $SQLdbase='DBase';
  5.  
  6. $mysqli = new mysqli($SQLhost, $SQLuser, $SQLpass, $SQLdbase);
  7. if ($mysqli->connect_errno) {
  8.     echo 'Unable to connect to MySQL: ('.$mysqli->connect_errno.')'.$mysqli->connect_error;
  9. }
  10.  
  11. $query='SELECT * FROM WORDS'; // <<<<<<<<<<<<< WORDS - a sheet of DBase
  12.  
  13. $res = $mysqli->query($query);
  14.  
  15. if($res!=FALSE) {
  16.     $res->data_seek(0);
  17.     while ($row = $res->fetch_assoc()) {
  18.          echo 'id='.$row['id'].'<br>';
  19.     }
  20. }
  21. else echo 'still not there';
  22.    
  23. 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top