Skip to content

Commit

Permalink
patch update
Browse files Browse the repository at this point in the history
  • Loading branch information
c006 committed Dec 11, 2015
1 parent 565f39e commit fa72d1a
Showing 1 changed file with 2 additions and 34 deletions.
36 changes: 2 additions & 34 deletions controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
use c006\utility\migration\assets\AppAssets;
use c006\utility\migration\assets\AppUtility;
use c006\utility\migration\models\MigrationUtility;
use yii\base\Object;
use yii\web\JqueryAsset;
use yii\web\Controller;
use Yii;

/**
Expand Down Expand Up @@ -230,40 +232,6 @@ public function actionIndex()
);
}


protected function mysql_direct($table)
{
print_r(Yii::$app->db);
exit;

$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);

}

/**
* @return \string[]
*/
Expand Down

0 comments on commit fa72d1a

Please sign in to comment.