You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found out that the execute() command returns 0 affected rows for the drop column.
The $model->delete() is never going to be executed, so the record from the ProfileField table in not going to be deleted.
Maybe there is another way to check if the sql command has been executed but not like that.
$sql = 'ALTER TABLE '.Profile::model()->tableName().' DROP '.$model->varname.'';
if ($model->dbConnection->createCommand($sql)->execute()) {
$model->delete();
}
The text was updated successfully, but these errors were encountered:
Hi, I found out that the execute() command returns 0 affected rows for the drop column.
The $model->delete() is never going to be executed, so the record from the ProfileField table in not going to be deleted.
Maybe there is another way to check if the sql command has been executed but not like that.
$sql = 'ALTER TABLE '.Profile::model()->tableName().' DROP
'.$model->varname.'
';if ($model->dbConnection->createCommand($sql)->execute()) {
$model->delete();
}
The text was updated successfully, but these errors were encountered: