title: Access query error ("syntax error in from clause")
body: <pre><code>$consulta3 = "SELECT * FROM Dept INNER JOIN Userinfo INNER JOIN Checkinout
                       on Dept.DeptName = '$departamento'
                       where Dept.Deptid = Userinfo.Deptid AND Userinfo.Name = Checkinout.name";
  </code></pre>
  
  <p>the thing im trying to do with this query is: i have a table called Dept where it has all the deparments names and ids, User info that has user name, a department id and a id. Also i have a 3rd table called checkinout that has user id, with a time.</p>
  
  <p>So i want (using the deparment's name) to bring all the data from the Checkinout table from the people that belongs to that deparment, but when i try that query it gives me an error: </p>
  
  <pre><code>syntax error in from clause. sql state 37000 in sqlexecdirect
  </code></pre>
  
  <p>and i cant solve it. Im using a Acces Data base.</p>
  
  <p>Thank you very much for you help.</p>