<?
/*
TheStreetGallery.com Website Application
Developed by Tom Doyle (2bscene Limited) 
Work began 13th March 2004
© TheStreetGallery.com
*/

// MySQL Database info

$config["db"]				= "pbi_i284typ";		// Database to use
$config["db_host"]			= "localhost"; 				// Server
$config["db_user"]			= "pbi_i284typ";					// Username
$config["db_pass"]			= "x6aWzUgeMrmdC";						// Password

// Upload Directory
$uploadDir = 'D:\websites\The Street Gallery\www\irish-art-images\\';

// Functions
function runquery($query) {

// Take configuration info from config file

global $config,	$no_array_result;

// Establish Permanaent DB Connection

	$link_id = mysql_pconnect($config["db_host"], $config["db_user"], $config["db_pass"]);
	$result = mysql_db_query($config["db"], $query, $link_id);

/* 
If we get a positive result return the array with a field containing the result ID
so that it can be re-used for further row requests, otherwise return -1 to signify an error
*/

if ($result && ! $no_array_result) {
	$return = @mysql_fetch_array($result);
	$return["ResultID"] = $result;
}
else $return["ResultID"] = "-1";
	$no_array_result = 0;
	return $return;
}


?>