-
Notifications
You must be signed in to change notification settings - Fork 480
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
Delete with where? #234
Comments
You could use the "delete_by" method as follows:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my model, I'm writing a new method that calls several model methods inside a transaction.
The queries all deal with deleting data.
I am starting off with a call to the same model, deleting a row where the ID matches the input variable and a flag is set to 1
So, the first bit is easy,
$this->delete($job_id)
but I want to combine that with aWHERE
statement, so I tried the following, based on the bit of documentation in the readme,$this->delete($job_id)->get_by('archived', 1);
- this failed miserably with the following errorFYI, here is the code from the readme I'm referring too. I know it's about soft deletes, but I assume it should work with normal deletes?
So, how do I do a delete with a where statement?
The text was updated successfully, but these errors were encountered: