title: mysql select on multiple table and multiple or condition
body: <p>i'm need help about sql query to select multiple table with multiple "or" condition. this is my database schema.</p>
  
  <p><strong>Hotel</strong></p>
  
  <ul>
  <li>id_hotel</li>
  <li>id_state</li>
  <li>id_city</li>
  <li>hotel_name</li>
  </ul>
  
  <p><strong>State</strong></p>
  
  <ul>
  <li>id_state</li>
  <li>state_name</li>
  </ul>
  
  <p><strong>City</strong></p>
  
  <ul>
  <li>id_city</li>
  <li>city_name</li>
  </ul>
  
  <p>thi is the query that i'm have been try, but result nothing.</p>
  
  <pre><code>$sql=mysqli_query($connection,"select * from hotel h, state s, city c where h.id_state=s.id_state and h.id_city=c.id_city and (h.hotel_name='$_GET[data]' or s.state_name='$_GET[data]' or c.city_name='$_GET[data]')");
  </code></pre>
  
  <p>I was try with that code.. and there is no result. Please help me guys.. tq</p>