title: mysql C++ select all rows from all columns
body: <p>I'm trying to select all rows from all columns in a table and output them to a string, i tried to increment the resultset and append each row to a string but that didn't work.</p>
  
  <p>The only way i can get it to work is if i manually change the resultset.getString() but that will only show 1 full row.</p>
  
  <pre><code>    sql::Driver *driver;
    sql::Connection *con;
    sql::Statement *stmt;
    sql::ResultSet *res;
  
    /* Create a connection */
    driver = get_driver_instance();
    con = driver-&gt;connect("tcp://127.0.0.1:3306", "root", "root");
    /* Connect to the MySQL test database */
    con-&gt;setSchema("test");
  
    stmt = con-&gt;createStatement();
    res = stmt-&gt;executeQuery("SELECT 'Hello World!' AS _message");
    while (res-&gt;next()) {
      cout &lt;&lt; "\t... MySQL replies: ";
      /* Access column data by alias or column name */
      cout &lt;&lt; res-&gt;getString("_message") &lt;&lt; endl;
      cout &lt;&lt; "\t... MySQL says it again: ";
      /* Access column fata by numeric offset, 1 is the first column */
      cout &lt;&lt; res-&gt;getString(1) &lt;&lt; endl;
    }
  </code></pre>
  
  <p>As you can see on the 2nd last line "cout &lt;&lt; res->getString(1) &lt;&lt; endl;" they select the 1st column manually.</p>
  
  <p>Would it be possible to select all columns so that it outputs all rows in all columns?</p>