Web Development Stuff / Experience - from KevinDaus
A blog for PHP, YII Framework,Javascript , MySQL, Linux related stuff
Sunday, September 18, 2016
Yii2 : Quoting table and column names
To avoid column quoting when creating a query string , use [[columnName]] for columns and {{table_name}} for tables for example $result = \Yii::$app->db ->createCommand("SELECT COUNT([[id]]) FROM {{tbl_user_accounts}}") ->queryScalar();
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)