如何将OpenCart与MSSQL Server连接

问题描述:

是否有可能将opencart与mssql连接?有人尝试过吗?如果是这样的话,该怎么做?

Is there any chance of connecting opencart with mssql? Have anyone tried? If so what is the procedure of doing that?

应该没什么大问题,您只需要这样做:

That should not be a big problem, You only need to do:

  • 创建/system/database/mssql.php类-该类应具有与例如mysql.php一个
  • 重写所有模型类方法的查询,以满足MS SQL/T-SQL SQL语法
  • 在两个配置文件(/config.php/admin/config.php)中的
  • 设置正确的DB_DRIVER-mssql
  • create /system/database/mssql.php class - the class should have the same methods, properties and functionality as e.g. the mysql.php one
  • rewrite all of the model classes method's queries to meet the MS SQL / T-SQL SQL syntax
  • in both config files (/config.php and /admin/config.php) set the proper DB_DRIVER - mssql

我想您已经由于/install/opencart.sql文件而创建了OpenCart数据库.

I am supposing You have the OpenCart database created already due to the /install/opencart.sql file.

我想什么也不要做.

无论如何,切换到MS SQL的原因是什么?

Anyway, what is the reason for switching to MS SQL?

编辑:在/system/database/中有一个mmsql.php文件,其中实际上包含MSSQL类,因此不必实现,只需重命名即可mssql.php文件.

EDIT: In /system/database/ there is this mmsql.php file which actually contains the MSSQL class thus this do not have to be implemented, just renamed to mssql.php file.