All pastes #389419 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-10 18:59 UTC
rendered paste body
	function mysql_fetch($field = '', $sorgu = '') {
	
		if($sorgu == '') $sorgu = $this->sonsorgu;
		
		$result = array();
		
		if($field == '') {
		
			while($row = mysql_fetch_array($sorgu)) {
			
				$result[] = $row;
				
			}
			
			return $result[0];
			
		} else {
		
			while($row = mysql_fetch_array($sorgu)) {
			
				$result[] = $row[$field];
		
			}
			
			return $result;
			
		}
	
	}