Posted By

cerxx on 10/14/19


Tagged

opencart php-hacks


Versions (?)

Get random db user


 / Published in: PHP
 

Get random db user on error "User has exceeded the 'max_questions' resource"

  1. //DB
  2. $DB_users = array('user','user2','user3','user4','user5','user6','user7');
  3. define('DB_DRIVER', 'mysqli');
  4. define('DB_HOSTNAME', 'localhost');
  5. define('DB_USERNAME', $DB_users[array_rand($DB_users)]);
  6. define('DB_PASSWORD', 'password');
  7. define('DB_DATABASE', 'database_name');
  8. define('DB_PORT', '3306');
  9. define('DB_PREFIX', 'oc_');

Report this snippet  

You need to login to post a comment.