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 

cron

if want use cron tasks, consider creating yii console application commands. configure use db settings , call tasks need yiic <command-name> <action-name>


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -