Created
July 30, 2015 18:29
-
-
Save RusAlex/bd5665e16190d11cf3b5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
$link = mysqli_connect("localhost","","","yiitest") or die("Error " . mysqli_error($link)); | |
$query = "SELECT id,val FROM bit_values" or die("Error in the consult.." . mysqli_error($link)); | |
$result = $link->query($query); | |
//display information: | |
while($row = mysqli_fetch_array($result)) { | |
var_dump($row); | |
} | |
/** | |
array(4) { | |
[0]=> | |
string(1) "1" | |
["id"]=> | |
string(1) "1" | |
[1]=> | |
string(1) "0" | |
["val"]=> | |
string(1) "0" | |
} | |
array(4) { | |
[0]=> | |
string(1) "2" | |
["id"]=> | |
string(1) "2" | |
[1]=> | |
string(1) "1" | |
["val"]=> | |
string(1) "1" | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment