public static find ( ) : |
||
return | the newly created [[ActiveQuery]] instance. |
$records = ModelName::find()->all();
$record = ModelName::find()->where(['column_name' => $value])->one();
$columns = Yii::$app->db->createCommand()->getTableSchema('table_name')->columns;This code will retrieve an array of column information for the table with the name `table_name`. The information such as name, type, size, default value, etc. Package Library: The yii.db ActiveRecord is part of the Yii framework, and it is included in the yii2 package, which can be found on the official Yii website. Therefore, it is not a separate package library.