Skip to main content

Database Class/Methods in Zencart

ZenCart has been a rewrite of OSCommerce, and is a notch above the latter in code quality and features. Database is accessed via a class (includes/classes/db/mysql/). Here's an example of how it can be used.
require ('includes/application_top.php');
$db = new queryFactory();

# DB_SERVER, DB_SERVER_USERNAME etc come from includes/configure.php
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);

Comments