Welcome Guest, Not a member yet? Register   Sign In
eh don't worry about it

I have a few database tables for my users and on occasion the delete will fail because at times not all the tables have data for that user. How do I structure a delete statement to fail gracefully, and not worry about finding a matching row?

* I'm in the process of cleaning up the validator so fields can't be empty, but for now I need to clean up the old data. *

I just run a bunch of these in a function...
Quote:$did = $this->input->post('did');
$this->db->where('did', $did);

$this->db->where('did', $did);


check if the table is not empty.
before deleting...

Theme © iAndrew 2016 - Forum software by © MyBB