Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on the delete action on the ProfileFieldController #58

Open
SkylightDev opened this issue Sep 3, 2013 · 0 comments
Open

Problem on the delete action on the ProfileFieldController #58

SkylightDev opened this issue Sep 3, 2013 · 0 comments

Comments

@SkylightDev
Copy link

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants