Search
 
SCRIPT & CODE EXAMPLE
 

SQL

yii2 mysql ping

public function ping() {
    try {
        Yii::$app->db->createCommand('SELECT 1')->query();
    } catch (yiidbException $exception) {
        Yii::$app->db->close();
        Yii::$app->db->open();
    }
}
Comment

PREVIOUS NEXT
Code Example
Sql :: sql command to find foreign key references 
Sql :: django sqllite config 
Sql :: mysql where in array 
Sql :: left join with only first record 
Sql :: wordpress sql change site url 
Sql :: vagrant mysql downgrade version 
Sql :: oracle list tablespaces 
Sql :: mysql get domain from url 
Sql :: bigquery get current date 
Sql :: mysql remove definers 
Sql :: t sql remove last character from string 
Sql :: edate dax 
Sql :: postgresql get last day of month 
Sql :: mysql insert generate serie 
Sql :: xampp mysql database server is not starting mac m1 
Sql :: oracle apex who is connected 
Sql :: sql server query list all databases 
Sql :: sqlite create index 
Sql :: mysql find and replace 
Sql :: v$session not found in oracle 
Sql :: how to print longest name in sql 
Sql :: sql fill na with 0 
Sql :: sql convert unix time to date 
Sql :: mysql set primary key 
Sql :: postgres count string length 
Sql :: sql server date now 
Sql :: postgres concat_ws 
Sql :: size of all tables in a schema oracle 
Sql :: how to use like in sql 
Sql :: date less than current date sql 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =