title: Allow Users to Perform mySQL Select Statements While Preventing SQL Injections
body: <p>I was planning on making an HTML form. The form will display the current table in the database as shown below</p>
  
  <pre><code>Toy  | Color
  Ball |  Red
  Bat  |  Yellow
  Glove|  Brown
  </code></pre>
  
  <p>At the end of the form, it should say "Make a query that gets all the toys and its respective color". So then users would be allowed to type in the select query. Please note the questions could vary so there isn't a consistent query that the user will always have to use. In essence, they have to write the ENTIRE query. I was wondering how should I go about this to prevent SQL injections. </p>