public function affectedRows()
	{

		//put this in try...catch block for better error handling
		try{

			//check if there is valid service instance
			if ( ! $this->validService() ) 
			{
				//throw exception
				throw new MySQLException("Not connected to a valid database service");

			}

			//get number of affected rows and return
			return $this->service->affected_rows;

		}

		//diplay error message
		catch(MySQLException $MySQLExceptionObject){

			//display error message
			$MySQLExceptionObject->errorShow();

		}

	}