Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $SQLhost='sub.domain.net';
- $SQLuser='user';
- $SQLpass='password';
- $SQLdbase='DBase';
- $mysqli = new mysqli($SQLhost, $SQLuser, $SQLpass, $SQLdbase);
- if ($mysqli->connect_errno) {
- echo 'Unable to connect to MySQL: ('.$mysqli->connect_errno.')'.$mysqli->connect_error;
- }
- $query='SELECT * FROM WORDS'; // <<<<<<<<<<<<< WORDS - a sheet of DBase
- $res = $mysqli->query($query);
- if($res!=FALSE) {
- $res->data_seek(0);
- while ($row = $res->fetch_assoc()) {
- echo 'id='.$row['id'].'<br>';
- }
- }
- else echo 'still not there';
- 1
Add Comment
Please, Sign In to add comment