PDA

View Full Version : mysql_connect_compress question.


Howard
03-23-2006, 10:54 PM
<a href="http://www.php.net/manual/en/function.mysql-connect.php" target="_blank">http://www.php.net/manual/en/function.mysql-connect.php</a>

On this page it mentions that you can compress mysql data. My question is does anyone how do I enable this in the includes/db_mysql.php for vb3.0.13?

The bandwidth between my web servers and database servers is going to reduced I figure this might help things a little.

DrewM
03-23-2006, 10:59 PM
can't you use $DB_site?

Howard
03-23-2006, 11:10 PM
can't you use $DB_site?

Sorry I don't follow.

Like I figure it will have to go somewhere here:

if ($usepconnect == 1)
{
$this->link_id = @mysql_pconnect($server, $user, $password);
}
else
{
$this->link_id = @mysql_connect($server, $user, $password);
}


I'm just not sure of the syntax to do this. I tried mysql_connect($server, $user, $password, ,mysql_client_compress) but that didn't work

n/m guys I figured it out. It's this:

@mysql_connect($server, $user, $password, false, CLIENT_COMPRESS);

and it won't work if you're trying this with a windows mysql server