posta Posted April 1, 2013 Share Posted April 1, 2013 (edited) How connect to second (..,third,..) database, using class DB (other pass and login)? I use this code to connect to main db $db = Db::getInstance(); Snx for replies.. Edited April 1, 2013 by posta (see edit history) Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted April 1, 2013 Share Posted April 1, 2013 Hi, this class uses singleton pattern. It meens that Db::getInstance always returns link to one object. What do you want to do with second, third connections? Do you want get some data from others DB? Regards Link to comment Share on other sites More sharing options...
posta Posted April 1, 2013 Author Share Posted April 1, 2013 Yes, i want operate data from other DB. How organize it into class DB? Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2013 Share Posted April 2, 2013 Well, i don't think that this is good solution, but you should try to connect with mysql via standard php: http://php.net/manua.../book.mysql.php just create new connection to external database and create queries with mysql_query 1 Link to comment Share on other sites More sharing options...
posta Posted April 2, 2013 Author Share Posted April 2, 2013 Well, i don't think that this is good solution, but you should try to connect with mysql via standard php: http://php.net/manua.../book.mysql.php just create new connection to external database and create queries with mysql_query No!! thanks! ))) I'll rewrite this class... Link to comment Share on other sites More sharing options...
kelvz Posted June 24, 2013 Share Posted June 24, 2013 I want to select data from other database without affecting prestashop classes... but how? Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted June 24, 2013 Share Posted June 24, 2013 Hi kelvz, you can try to make override standart Prestashop classes Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now