title: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1109 Unknown table 'users' in information_schema
body: <p>i am trying to run a query that worked offline on a local server now when i have put i on a server i get this error. it seems to be having problem with the query searching the database and not sure what part is doing it. also the table are not in the infomation_schema</p>
  
  <p>any recommendation or tip would be much appreciated. i don't have a lot of experience with php or mysql.
  thanks</p>
  
  <blockquote>
    <p>Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or
    view not found: 1109 Unknown table 'users' in information_schema in
    /storage/ssd2/815/12196815/public_html/classes/DB.php:11 Stack trace:
     #0 /storage/ssd2/815/12196815/public_html/classes/DB.php(11): PDOStatement->execute(Array) #1
    /storage/ssd2/815/12196815/public_html/create-account.php(27):
    DB::query('SELECT username...', Array) #2 {main} thrown in
    /storage/ssd2/815/12196815/public_html/classes/DB.php on line 11</p>
  </blockquote>
  
  <pre><code>private static function connect() {
              $pdo = new PDO('mysql:localhost;dbname=id12196815_findomevents;charset=utf8', 'id12196815_findomevents', 'Findomevents');
              $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
             return $pdo;
      }
  
      public static function query($query, $params = array()) {
              $statement = self::connect()-&gt;prepare($query);
              $statement-&gt;execute($params);
              if (explode(' ', $query)[0] == 'SELECT') {
              $data = $statement-&gt;fetchAll();
              return $data;
              }
      }
  
  
  
  if (isset($_POST['createaccount'])) {
      $username = $_POST['username'];
      $password = $_POST['password'];
      $email = $_POST['email'];
      if (!DB::query ("SELECT username FROM users WHERE username=:username", array(':username'=&gt;$username))) {
              if (strlen($username) &gt;= 3 &amp;&amp; strlen($username) &lt;= 32) {
                      if (preg_match('/[a-zA-Z0-9_]+/', $username)) {
                              if (strlen($password) &gt;= 6 &amp;&amp; strlen($password) &lt;= 60) {
                              if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                              if (!DB::query('SELECT email FROM users WHERE email=:email', array(':email'=&gt;$email))) {
                                DB::query ('INSERT INTO users VALUES (\'\', :username, :password, :email)', array(':username'=&gt;$username, ':password'=&gt;password_hash($password, PASSWORD_BCRYPT), ':email'=&gt;$email));
                                      Mail::sendMail('Welcome to our Social Network!', 'Your account has been created!', $email);
                                      echo "Success!";
                              } else {
                                      echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;Email In Use!&lt;/p&gt;';
                              }
                      } else {
                                     echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;Invalid Email!&lt;/p&gt;';
                              }
                      } else {
                              echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;Invalid Password!&lt;/p&gt;';
                      }
                      } else {
                              echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;Invalid Username!&lt;/p&gt;';
                      }
              } else {
                      echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;Invalid Username!&lt;/p&gt;';
              }
      } else {
              echo '&lt;br&gt;&lt;p class="text-center text-white bg-danger"&gt;User Already Exists!&lt;/p&gt;!';
      }
  </code></pre>