Problems encountered during php development (the overall design of a project): User user1, user2, user3, user4, user5 ..... the operations performed by the users are the same, but the databases accessed during the execution are different (DB1, DB2, DB3, DB4, db5 ......). Problems encountered during php development (the overall design of a project)
User 1, user2, user3, user4, user5...... the user used to perform the same operation, but the number of accesses during execution
Different databases (DB1, DB2, DB3, DB4, db5 ......).
User1 --> access through php --> DB1
User2 --> access through php --> DB2
User3 --> access through php --> DB3
User4 --> access through php --> DB4
User5 --> access through php --> DB5
..................
The above php program is the same program and implements the same functions.
What should I do to implement the above functions?
------ Solution --------------------
You can select different databases based on your needs.
------ Solution --------------------
You are not sure about the number of users. of course, we create 2 arrays in a loop, a radish and a pitfall!
------ Solution --------------------
Reference:
You can select different databases based on your needs.
Simple use of his;
Reference:
You are not sure about the number of users. of course, we create 2 arrays in a loop, a radish and a pitfall!
Efficient and fast, with arrays
------ Solution --------------------
It turns out to be like this ,~~
You can get the user and the database, and then upload the data to the database ~
------ Solution --------------------
If two users access the php program at the same time but access different databases, will there be conflicts?
No.
Didn't I give it to you?
------ Solution --------------------
The following is an example. of course, you can use arrays.
switch($user)
{
case 'user1':
mysql_select_db('db1');
break;
case 'user2':
mysql_select_db('db2');
break;
.........................
}