title: SQLSTATE[42S02] + SQLSTATE[42S22] netflix clone
body: <p>thank you for taking look at my problem, I cannot describe how bad I feel, if you could help me, I would be so happy.</p>
  <p>I was doing website from udemy course name &quot;Create Netflix clone&quot; It worked fine on my Xampp on localhost but when I publish it on hostprovider-&gt; <a href="http://www.dingy.cz" rel="nofollow noreferrer">www.dingy.cz</a> I have got problem</p>
  <p><strong>PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dingyczcz.dingyczczvideoProgress' doesn't exist in <b>/www/doc/www.dingy.cz/www/includes/classes/VideoProvider.php</b> on line <b>43</b><br /></strong></p>
  <p>since I am just learing everything I am pretty lost, even if I am trying to google asnwers,</p>
  <p>this is my code in VideoProvider.php :</p>
  <pre><code>//&lt;?php
  //class VideoProvider {
      public static function getUpNext($con, $currentVideo) {
          $query = $con-&gt;prepare(&quot;SELECT * FROM videos
                              WHERE entityId=:entityId AND id != :videoId
                              AND (
                                  (season = :season AND episode &gt; :episode) OR season &gt; :season
                              )
                              ORDER BY season, episode ASC LIMIT 1&quot;);
          $query-&gt;bindValue(&quot;:entityId&quot;, $currentVideo-&gt;getEntityId());
          $query-&gt;bindValue(&quot;:season&quot;, $currentVideo-&gt;getSeasonNumber());
          $query-&gt;bindValue(&quot;:episode&quot;, $currentVideo-&gt;getEpisodeNumber());
          $query-&gt;bindValue(&quot;:videoId&quot;, $currentVideo-&gt;getId());
          
          $query-&gt;execute();
  
          if($query-&gt;rowCount() == 0) {
              $query = $con-&gt;prepare(&quot;SELECT * FROM videos
                                      WHERE season &lt;=1 AND episode &lt;= 1
                                      AND id != :videoId
                                      ORDER BY views DESC LIMIT 1&quot;);
              $query-&gt;bindValue(&quot;:videoId&quot;, $currentVideo-&gt;getId());
              $query-&gt;execute();
          }
  
          $row = $query-&gt;fetch(PDO::FETCH_ASSOC);
          return new Video($con, $row);
      }
  
  
  
  //32line    public static function getEntityVideoForUser($con, $entityId, $username) {
          $query = $con-&gt;prepare(&quot;SELECT videoId FROM `videoProgress` 
                                  INNER JOIN videos
                                  ON videoProgress.videoId = videos.id
                                  WHERE videos.entityId = :entityId
                                  AND videoProgress.username = :username
                                  ORDER BY videoProgress.dateModified DESC
                                  LIMIT 1&quot;);
  
          $query-&gt;bindValue(&quot;:entityId&quot;, $entityId);
          $query-&gt;bindValue(&quot;:username&quot;, $username);
          $query-&gt;execute();
  
          if($query-&gt;rowCount() == 0) {
              $query = $con-&gt;prepare(&quot;SELECT id FROM videos
                                      WHERE entityId=:entityId
                                      ORDER BY season, episode ASC LIMIT 1&quot;);
              $query-&gt;bindValue(&quot;:entityId&quot;, $entityId);
              $query-&gt;execute();
          }
  
  //53line        return $query-&gt;fetchColumn();
      }
  }
  ?&gt;
  </code></pre>
  <p>and here is my mysqldatabse</p>
  <p><a href="https://i.stack.imgur.com/nW1ma.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nW1ma.jpg" alt="mysqldatabase" /></a></p>
  <p>and if I create database with name dingyczczvideoProgress
  I am getting another message:</p>
  <p><strong>PDOStatement::execute(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'videoProgress.username' in 'where clause' in <b>/www/doc/www.dingy.cz/www/includes/classes/VideoProvider.php</b> on line <b>43</b><br /></strong></p>
  <p><a href="https://i.stack.imgur.com/XRMzx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XRMzx.jpg" alt="mysqldingyczczvideoProgress" /></a></p>