// If the table we already have contains the id of a row we need in\r
// another table \r
//if(isset($row[$this->_tableName . '_id'])) {\r
- if(array_key_exists($this->_tableName . '_id', $row)) { //this is a better choice as somtimes the array key is set, but is equal to null, and isset doesn't like that\r
+ if($row && array_key_exists($this->_tableName . '_id', $row)) { //this is a better choice as somtimes the array key is set, but is equal to null, and isset doesn't like that\r
$join_id = $row[$this->_tableName . '_id'];\r
$statement = $db->prepare(sprintf('SELECT * from %s WHERE id=%u',\r
$table,\r