All pastes #389403 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-10 18:50 UTC
rendered paste body
	function MultipleQuery($table,$fields,$where="",$url="")
	{
		$array = array();
		
		$sql = $this->Query("SELECT $fields FROM ".$this->prefix."_".$table." $where");
		while($row = $this->FetchArray($sql))
		{
			$replace = $row;
			if($url != "")
			{
				parse_str($url,  $link);
				$row["url"] = $url;
				foreach ($link as $key => $value)
				{
					if($key != "section" && $key != "/index_php?sayfa")
					{
						if($key == "name")
						{
							$replace[$key] = $this->Htaccess($replace[$key]);
						}
						$row["url"] = str_replace($value,$replace[$key],$row["url"]);
						
					}
				}
			}
			$row["url"] = str_replace("&","&",$row["url"]);
			array_push($array,$row);
		}
		return $array;		
	}