public static function updateStatement($tableName, $data, $assocPkValue, $db = null)
 {
     if ($db == null) {
         $db = self::$_db;
     }
     $sets = self::setsStatement($tableName, $data, $db);
     $where = Lms_Item_Sql::combineToAnd($assocPkValue);
     $query = "UPDATE {$tableName} SET {$sets} WHERE {$where} LIMIT 1";
     return $query;
 }
 protected function _load($assocPkValue)
 {
     $query = "SELECT * FROM " . $this->getTableName() . " WHERE " . Lms_Item_Sql::combineToAnd($assocPkValue);
     $result = $this->_slaveDb->selectRow($query);
     if (!$result) {
         throw new Lms_Item_RecordNotExistsException('No such record in data base');
     }
     return $result;
 }