开发者

Single user login between forum and OpenCart software

开发者 https://www.devze.com 2023-01-31 01:50 出处:网络
I have a site with a vanilla for开发者_Python百科um and an OpenCart store.I would like the users to be able to log in to both databases using one login from either the forum or the cart.For example, i

I have a site with a vanilla for开发者_Python百科um and an OpenCart store. I would like the users to be able to log in to both databases using one login from either the forum or the cart. For example, if they log in to the forum then navigate to the cart, they would already be logged in


See: http://dev.mysql.com/doc/refman/5.1/en/select.html

You can have your user table hosted in one database, and your shop hosted in another. As long as your connected mysql user has read and/or write access to all databases named in the query, there is no issue. It doesn't matter which database you initial connect to as that only sets the current relative database you're working with. You can reference tables across any number of databases accessible by the connection and user.

In your sql statements, to reach across tables located in other databases on the same server, use the syntax database_name.table_name, and database_name.table_name.column_name to reference a column in a table in another database on that server.

0

精彩评论

暂无评论...
验证码 换一张
取 消