Welcome Guest, Not a member yet? Register   Sign In
Deleting selected records
#2

You can try this:
PHP Code:
$this->db->where('title REGEXP "^[a-z]" 'NULL,FALSE);
$this->delete('mz'); 

Explanation:
Usually, the where function in the query builder class will accept 2 parameters: the field and the value.
But it also accepts a custom MySQL statement as the first parameter. Then you must set the second parameter to NULL, and add a third parameter to tell the query builder that it should not try to "escape" the query.
Reply


Messages In This Thread
Deleting selected records - by codeguy - 11-01-2016, 10:18 AM
RE: Deleting selected records - by Wouter60 - 11-01-2016, 12:02 PM
RE: Deleting selected records - by codeguy - 11-01-2016, 03:59 PM
RE: Deleting selected records - by codeguy - 11-01-2016, 04:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB