I was just wondering if makes any different, when executing mysql_query, if you include the optional second parameter for the connection.
I've been writing scripts that open a connection with this function:
function db_connect()
{
$result = @mysql_pconnect('localhost', 'username', 'password');
if(!$result)
return(false);
if(!@mysql_select_db($result))
return(false);
return($result);
}
then I call the function like this
$conn = db_connect();
But for some reason I ended up with an error in some scripts if I include $conn as the second parameter for mysql_query(). When I took it out the script worked perfectly.😕