title: RMySQL - automating reading data from DB tables
body: <p>I have a piece of code thus:</p>
  
  <pre><code>mydb &lt;- dbConnect(MySQL(), user = "****", password = "****", dbname = "c_global", host = "")
  
  df_ipt_rate_history   &lt;- fetch(dbSendQuery(mydb, "select * from ipt_rate_history"), n=-1)
  df_map_occupation     &lt;- fetch(dbSendQuery(mydb, "select * from map_occupation"), n=-1)
  df_map_titles         &lt;- fetch(dbSendQuery(mydb, "select * from map_titles"), n=-1)
  df_pcode_full_areas   &lt;- fetch(dbSendQuery(mydb, "select * from pcode_full_areas"), n=-1)
  df_pcode_rics_regions &lt;- fetch(dbSendQuery(mydb, "select * from pcode_rics_regions"), n=-1)
  df_pcode_sector_areas &lt;- fetch(dbSendQuery(mydb, "select * from pcode_sector_areas"), n=-1)
  </code></pre>
  
  <p>...and so on (multiple tables)</p>
  
  <pre><code>dbDisconnect(mydb)
  </code></pre>
  
  <p>It works fine but is there a way to set up some kind of loop that reads every table in a DB (and outputs to a data frame) in a single command?</p>
  
  <p>Thank you</p>