mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Close Connection when there is no connection value.
* If there is no $connection value, a server error message would be written on your server log.(PHP can not handle it.) * r13162, r13161 has some mistake(Context::close() makes memory overload at DB close. I tested for a day... T^T;;) git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13166 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7d91bb2f1a
commit
616ff1e8c9
2 changed files with 6 additions and 4 deletions
|
|
@ -87,6 +87,10 @@ class DBMysql extends DB
|
|||
|
||||
// Attempt to connect
|
||||
$result = @mysql_connect($connection["db_hostname"], $connection["db_userid"], $connection["db_password"]);
|
||||
if(!$result)
|
||||
{
|
||||
exit('XE cannot connect to DB.');
|
||||
}
|
||||
|
||||
if(mysql_error())
|
||||
{
|
||||
|
|
@ -192,8 +196,7 @@ class DBMysql extends DB
|
|||
{
|
||||
if(!$connection)
|
||||
{
|
||||
Context::close();
|
||||
exit();
|
||||
exit('XE cannot handle DB connection.');
|
||||
}
|
||||
// Run the query statement
|
||||
$result = mysql_query($query, $connection);
|
||||
|
|
|
|||
|
|
@ -111,8 +111,7 @@ class DBMysql_innodb extends DBMysql
|
|||
{
|
||||
if(!$connection)
|
||||
{
|
||||
Context::close();
|
||||
exit();
|
||||
exit('XE cannot handle DB connection.');
|
||||
}
|
||||
// Run the query statement
|
||||
$result = @mysql_query($query, $connection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue