insert() public method
Inserts the record into the database using the attribute values of this record.
Usage example:
$customer = new Customer; $customer->name = $name; $customer->email = $email; $customer->insert();
public boolean insert ( $runValidation = true, $attributes = null ) | ||
---|---|---|
$runValidation | boolean |
Whether to perform validation (calling \yii\redis\Model::validate()) before saving the record. Defaults to |
$attributes | array |
List of attributes that need to be saved. Defaults to |
return | boolean |
Whether the attributes are valid and the record is inserted successfully. |
Please login to continue.