All pastes #626118 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-07-19 12:24 UTC
rendered paste body
/* lines: 36 - 55 */
public function query()
	{
		$args = func_get_args();
		
		if(count($args) == 1){
			$result = $this->mysql->query($args['0']) or die($this->mysql->error);
			
			if(is_object($result)){
				$this->queries[] = $result;
			}
		} else {
			$result = $this->mysql->query(vsprintf($args['0'], array_slice($args, 1))) or die($this->mysql->error);	
			
			if(is_object($result)){
				$this->queries[] = $result;	
			}
		}
		
		return count($this->queries) - 1;
	}