[eluser]ray73864[/eluser]
I'm gonna tell you why, but it is pretty easy to see why so i think you should look over your code before asking questions. Anyway, the problem is with how you have done your query.
You are closing your double quotes before you name the table, so php is getting very confused and thinking that 'AssocPersonMaster is supposed to be something but it isn't sure what.
I think what you want would be this:
$sql = "SELECT * FROM AssocPersonMaster WHERE PersonID=? OR Status=?";
$query = $this->db->query($sql,array('9788771','b'));
I thin you should also read up on the 'Active Record' features of the database class, as it allows you to better drill down with your queries ie.
$this->db->select('*');
$this->db->from('AssocPersonManager');
$this->db->where('PersonID',9788771);
$this->db->or_where('Status','b');
$query = $this->db->get();
Also, never use * when doing a select query, mostly because it grabs every single column in your database which for 10 columns can slow you down a bit, it is better to name the columns you want to get out.