Last active
June 22, 2016 06:42
-
-
Save danielkhan/43d8df079ea72080dff3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Connect to mySQL (*blocking*) | |
$link = mysqli_connect("localhost", "user", "password", "test"); | |
// Run a query and store result object (*blocking*) | |
if($result = mysqli_query($link, "SELECT * FROM Person")) { | |
// Fetch data from phps internal buffer into $data | |
$data = mysqli_fetch_all($result); | |
// Output the data to the browser | |
print_r($data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment