- Made it possible to connect to mysql databases running on non-standard
ports. Patch by Alastair.4.1.x
							parent
							
								
									66c5b70736
								
							
						
					
					
						commit
						1e5813d4f4
					
				| 
						 | 
				
			
			@ -4,6 +4,11 @@
 | 
			
		|||
function db_connect($url) {
 | 
			
		||||
  $url = parse_url($url);
 | 
			
		||||
 | 
			
		||||
  // Allow for non-standard MySQL port.
 | 
			
		||||
  if ($url["port"]) {
 | 
			
		||||
     $url["host"] = $url["host"] . ":" . $url["port"];
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  mysql_pconnect($url["host"], $url["user"], $url["pass"]) or die(mysql_error());
 | 
			
		||||
  mysql_select_db(substr($url["path"], 1)) or die("unable to select database");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue