Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with V2.3.3.2


ABS0lute

Recommended Posts

This is not a good way for direct one file for database

 

Must one file for all osc database function. and different include file for mysql type.

 

Some suggest on oscommerce.

 

1.unify the database encoding in front and admin "SET NAMES UTF8", and also in backupdatabase.

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

if (USE_PCONNECT == 'true') {

$server = 'p:' . $server;

}

$$link = mysqli_connect($server, $username, $password, $database);

 

///change db to utf-8

define('DB_CHARSET','UTF8');

@mysqli_query($$link, "SET NAMES '" . DB_CHARSET . "'");

if (function_exists('mysqli_set_charset')) {

@mysqli_set_charset($$link,DB_CHARSET);

}

else {

@mysqli_query($$link, "SET CHARACTER_SET_CLIENT = '" . DB_CHARSET . "'");

@mysqli_query($$link, "SET CHARACTER_SET_RESULTS = '" . DB_CHARSET . "'");

}

///change db to utf-8

return $$link;

}

 

 

 

2.unify the data time both on database and php. date_default_timezone_set() and database tep_db_query("SET time_zone = ...... now only the php time. no any use.

 

 

3. also add database support both InnoDB (roll-back important operation... ) and MyISAM

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...