php - how to custom connect the database from yii -
im trying connect db in yii connection how can ?
in below screen shot there cron.php have trying connect database root folder how d ?
cron.php
require('framework/db/cdbconnection.php'); $connection=new cdbconnection($dsn,'root',''); $connection->active=true;
i need use yii connection instead of mysql
$mysql_con = mysql_connect('localhost','root',''); mysql_select_db('som',$mysql_con); //local db
if want use cron
tasks, consider creating yii console application commands. configure use db settings , call tasks need yiic <command-name> <action-name>
Comments
Post a Comment