6 years ago a guy looked at me face to face, and boldly told me; "I don't like you!" I immediately fired a response, I asked him that day; "Thank you for the honest feedback, but those that you like, how has it made their life better? How does your liking people pay their bills or take a bank loan? My brother keep your like, I need God's like And that's what guarantees my future. Today I joined a CEO friend of mine in an interview Panel to recruit some new staff, it was a long session, as we returned from a coffee break to continue the hectic interview session, here was this same guy walked in with his grey jacket and CV coming for the interview. Our eyes kissed by fluke, we immediately recognised each other; "the world is indeed spherical", I soliloquized. He felt very uncomfortable through out the interview, one could clearly see the volcanic eruption ongoing in his whole nervous system, he even mistook his date of birth for his last date of empl...
I saw this on a blog n thot its nice to share too.
Use multiple databases in OpenCart
Posted: April 13, 2013 by Sankar Vijayakumar in OpenCart
Tags: blog, blogging, database, opencart, programmer, software, technology 21
To use multiple databases in OpenCart, just update 3 files as given below:
Config.php:
Add:
//New DB
define('NEWDB_DRIVER', 'mysql');
define('NEWDB_HOSTNAME', 'localhost');
define('NEWDB_USERNAME', 'root');
define('NEWDB_PASSWORD', 'password');
define('NEWDB_DATABASE', 'sitename_newdb');
define('NEWDB_PREFIX', 'ndb');
Index.php:
Below the current database setup ($db = new DB(DB_DRIVER …) add:
$newdb = new DB(NEWDB_DRIVER, NEWDB_HOSTNAME, NEWDB_USERNAME, NEWDB_PASSWORD, NEWDB_DATABASE);
$registry->set('newdb', $newdb );
system/database/mysql.php:
Modify:
change:
if (!$this->link = mysql_connect($hostname, $username, $password)) {
to:
if (!$this->link = mysql_connect($hostname, $username, $password, true)) {
After these above steps we can access the new database by:
$this->newdb->query("SELECT * FROM ". NEWDB_PREFIX . "users");
Use multiple databases in OpenCart
Posted: April 13, 2013 by Sankar Vijayakumar in OpenCart
Tags: blog, blogging, database, opencart, programmer, software, technology 21
To use multiple databases in OpenCart, just update 3 files as given below:
Config.php:
Add:
//New DB
define('NEWDB_DRIVER', 'mysql');
define('NEWDB_HOSTNAME', 'localhost');
define('NEWDB_USERNAME', 'root');
define('NEWDB_PASSWORD', 'password');
define('NEWDB_DATABASE', 'sitename_newdb');
define('NEWDB_PREFIX', 'ndb');
Index.php:
Below the current database setup ($db = new DB(DB_DRIVER …) add:
$newdb = new DB(NEWDB_DRIVER, NEWDB_HOSTNAME, NEWDB_USERNAME, NEWDB_PASSWORD, NEWDB_DATABASE);
$registry->set('newdb', $newdb );
system/database/mysql.php:
Modify:
change:
if (!$this->link = mysql_connect($hostname, $username, $password)) {
to:
if (!$this->link = mysql_connect($hostname, $username, $password, true)) {
After these above steps we can access the new database by:
$this->newdb->query("SELECT * FROM ". NEWDB_PREFIX . "users");
Comments
Post a Comment
Your say...