How to solve Mysql PDOException: SQLSTATE[42S02]: Base table or view not found: I have created form to add general information about daily work. When I submit this form it will give me following error. Please help me. I have checked my setting.php. There prefix is drup_


  PDOException: SQLSTATE[42S02]: Base table or view not found: 1146
  Table 'i1164525_drup1.drup_drup_Detailstable' doesn't exist: INSERT
  INTO {drup_Detailstable} (Username, Email_Id,
  Work_Location,Team_size,Total_hours,Date,Description,Verified) VALUES
  ('admin','swap@mm.com','abc','1','20','12/12/2014','Test','Not
  Verified'); Array ( ) in eval() (line 43 of
  /home/csrdiarycom/public_html/modules/php/php.module(80) : eval()'d
  code).


 &lt;form name="form" method="post" action=''&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
 &lt;label&gt;Work Location&lt;/label&gt;
 &lt;input type="Text" name="location" value=""/&gt;
 &lt;label&gt;Individual/ Number of people&lt;/label&gt;
 &lt;input type="Text" name="numberofpeople" value=""/&gt;
 &lt;label&gt;Date&lt;/label&gt;
 &lt;input type="Text" name="date" value=""/&gt;
 &lt;label&gt;Total Time spend by You/Team(In Hours)&lt;/label&gt;
 &lt;input type="Text" name="Totalhours" value=""/&gt;
 &lt;label&gt;Your Experience&lt;/label&gt;
 &lt;textarea row="5" maxlength="200" cols="30%" name="comment"&gt;Type here&lt;/textarea&gt;
 &lt;input type="Submit" name='Submit'/&gt;&lt;/form&gt;
 &lt;?php
 if(isset($_POST['Submit']))
 {
   $location=$_POST['location'];
   $numberofpeople=$_POST['numberofpeople'];
   $Totalhours=$_POST['Totalhours'];
   $date=$_POST['date'];
   $comment=$_POST['comment'];
   db_query("INSERT INTO {drup_Detailstable} (Username, Email_Id, Work_Location,Team_size,Total_hours,Date,Description,Verified) VALUES ('$e','$e','$location','$numberofpeople','$Totalhours','$date','$comment','Not Verified')")-&gt;execute();
  echo "&lt;h2&gt;Thank you for your Comment!&lt;/h2&gt;";
  }}
  ?&gt;
Remove the 'drup_' prefix from your db_query call. Since you define a prefix in settings.php, using {Detailstable} will automatically add the prefix on lookup.