Skip to content

Instantly share code, notes, and snippets.

@RusAlex
Created July 30, 2015 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RusAlex/e7719b8da8ceb058bab2 to your computer and use it in GitHub Desktop.
Save RusAlex/e7719b8da8ceb058bab2 to your computer and use it in GitHub Desktop.
<?php
$link = mysql_connect('localhost', '', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db('yiitest', $link) or die('Could not select database.');
$res = mysql_query("SELECT id, val FROM bit_values", $link );
while($row = mysql_fetch_assoc($res)) {
var_dump($row);
}
mysql_close($link);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment