MySQL Forums
Forum List  »  PHP

Re: Newby needs some help - collation/charset ?
Posted by: Marvin Miller
Date: December 20, 2013 03:37PM

It may be easier then that (?) :)

It looks like everything site-wide makes a call to a driver file called mySQL.php whenever a programmer wants to connect to the dB (this would make sense from my limited perspective).

This looks like the code we'd be interested in but I'm not sure how it should be marked up;

function connect() {

if ($this->obj['persistent'])
{
$this->connection_id = mysql_pconnect( $this->obj['sql_host'] ,
$this->obj['sql_user'] ,
$this->obj['sql_pass']
);
}
else
{
$this->connection_id = mysql_connect( $this->obj['sql_host'] ,
$this->obj['sql_user'] ,
$this->obj['sql_pass']
);
}

if ( !mysql_select_db($this->obj['sql_database'], $this->connection_id) )
{
echo ("ERROR: Cannot find database ".$this->obj['sql_database']);
}
}

Does that make sense or help?

Options: ReplyQuote


Subject
Written By
Posted
Re: Newby needs some help - collation/charset ?
December 20, 2013 03:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.