Yii?? ?? ??? ?? SQL ??? ??? ????.
1. ????? ???? ???? ????.
?? index.php?? ??? ??? ???.
// remove the following lines when in production mode defined('YII_DEBUG') or define('YII_DEBUG',true); // specify how many levels of call stack should be shown in each log message defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); //app use time //defined('YII_BEGIN_TIME') or define('YII_BEGIN_TIME',microtime(true));
main.php ???:
'errorHandler'=>array( // use 'site/error' action to display errors 'errorAction'=>'site/error', ), 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'error, warning', ), // 下面顯示頁面日志 array( 'class'=>'CWebLogRoute', 'levels'=>'trace', //級別為trace 'categories'=>'system.db.*' //只顯示關(guān)于數(shù)據(jù)庫信息,包括數(shù)據(jù)庫連接,數(shù)據(jù)庫執(zhí)行語句 ), ), ),
??? ??? YII_TRACE_LEVEL? ? ?? ??? ????. 2. ??? ??? ?????:
yii-debug-toolbar. ???? ??? ?? ?? ????? ????. ?? ?? main ?? ?? ??
'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'ext.yii-debug-toolbar.YiiDebugToolbarRoute', 'ipFilters'=>array('127.0.0.1','192.168.1.215'), ), ), ),
? ?????. .php? ??? ??? 'comments' ??? ?????. db? ? ?? ??? ?????.
'enableProfiling'=>true, 'enableParamLogging'=>true,
??? ?? ??? ??? ?? ????? ??? ??? ???? sql ?? ??? ?? ????. ?? ??? ?? ?????.
?? ????:
yii? ??? yii?? SQL? ????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??????? ?? ? ?? ? ?? ?? ??? ??????. ??, ??? ??? ? ?? ???? ???? ?? 1 ? ? ?? ?? ?? ??? ???? ?????. ??, ??? ? ??? ????? ???? ????? ? ?? ?? ?? (3NF)? ???? ???? ???? ??? ???? ?????. ??, ?? ??? ?? ???? ??? ???? ??? ?? ?? ??? ??? ???? ?????. ?????, ??? ?? ?? ?? ? ?? ???? ???? ???? ?? ??? ??????. ??? ??? ????? ???? ????? ??? ?????? ??? ???? ? ??? ? ? ????.

SQL? ??? ???? ??? ?? ??? ?? ???? ????? ? ???? ??? ?????. 1. ?? ??? (? : =,>, 30; 2. ?? ? ?? ? ? ?? ??? ???? ?? ???? ???? ?? ?? ???? ?????. ISNULL ?? ISNOTNULL? ?? ??? ???? ???? ?? NULL ?? ?????.

??? ?? ??? ????? Renametable ?? Altertable ??? ???? SQL? ?????. 1.mysql, mariadb ? ?? ??????? renametable_table_nametonew_table_name? ?????. ??? ?? ??? ?????. 2. sqlserver? sp_rename ?? ?? ??? ???? ??? execsp_rename'old_table_name ','new_table_name '???. 3.postgresql? altertableold_table_namerenametonew_table_name? ?????

?? ?? SQL??? ?????? ??? ?? ?? ??? ???????. MySQL?%y,%m ? selectDate_format (now (), '%y-%m-%d')? ?? ?? ??? ?????. sqlserver? convert () ?? format ()? ????, ??? selectConvert (varchar, getDate (), 112)?? ??? selectFormat (getDate (), 'yyyy-mm-dd'); PostgreSQL? selectto_char (now (), 'y? ?? to_char ()? ?????

???? ?? ????? ? ?? ?? ??? ?? ??? ?????? ?? ????? ??? ?? ??? ?????. ???? ???? MySQL? ??? ???? ??, PostgreSQL? ??? ??, SQLServer 's AlwaysOn Group ? RDS? readReplica ????? ?????. ?? ??? ?? ???? ??? ?? ?? ? ? ??? ???? ?? ORM ??? ??? ????? ??????. ?? ???? ???? ?? ??, ???? ?? ? ??, ?? ?? ?? ? ???? ?? ??? ?????.

YII? ??? ?? SQL ??? ???? YII :: $ app-> db? ?? ??? ? ????. ??? ??? ????. 1. createCommand ()? ???? ?? ??? ????. 2. SQL ??? ???? ?? bindValue () ?? bindparam ()? ?? ??? ????; 3. QueryAll (), QueryOne () ? ?? ???? ???? ??? ?????. 4. ?? ? ???? ??? ?? insert () ? Update () ???? ?? ? ? ????. 5. SQL? ?? ???? ????? ????? ?? ????. 6. ??? ??? ?? ???? ?? ??? ??????? ??? ? ????. 7. QueryBuilder? ???? ??? ??? ?? ???? ???? ??????.

???? YII ????? ???? ???? ? ???? ???????. 1. ActiveFixture? ???? ??? ???? ?? ??? ???? ????. 2. $? ?? ??? ??? ??????. 3. ???/?????? ??? ??? ?????. 4. FixTures () ???? ?? ??? ???? ??? ?????. 5. YII? ??? ? ???? ???????? ?????. ?? ??, userfixture? ???/fixtures/data/user.php ??? ??? ?????????. ????? ?? Assertion Verification? ?? $ this-> ??? [ 'user1']? ?? Alice? ???? ?? ? ????. YII? ??? FI? ?????

YII?? ??? ????? ??? ????? ?? ?? ?????? ???? ? ?????. 1. ?? () ???? ???? Pagination ? LinkPager? ?? ?? ?? ? ?? ??? ?? ????? ActiveForm? ??????. 2. ???? ???? ??? ???? ?????? GridView, ?? ?? ?? ????? DetailView ? ?? ?? ????? ??? ?????. 3. ??? ?? ??? yii \ base \ widget? ??, run () ???? ???? Hellowidget ??? ??? ??? ??? ?? ????? ?? ??? ???? ?? ? ????. ??? ?? ??? ????? ? ?? ???? ???? ? ????.
