title: DB Connect and Select with Delphi (FIREMONKEY - iOS)
body: <p>I have a database and want to select an entry with <strong>DELPHI and FIREMONKEY CROSSOVER</strong>.
  <em>But I never worked with SQL on DELPHI. And I cant figure out how to connect to the DB with DELPHI.</em> I dont want a hand full of components. It should be an easy connection, like it is with PHP.</p>
  
  <p>I use XAMPP - mySQL.
  Let's say we have a database, "db_x", with a tabel "users", in that table there is the following entry:
  <strong>name: Michael; surname: Schneider; age: 22</strong>.</p>
  
  <p>The Database is on "localhost" or somewhere else, login is "root" and password is "rootpw". To connect to the DB in PHP we use:</p>
  
  <pre><code>mysql_connect("localhost","root","rootpw") or die ("Connection Error");
  mysql_select_db("db_x") or die ("Error DB");
  </code></pre>
  
  <p>Now I wanna get the <strong>surname</strong> from a user named "<strong>Michael</strong>":</p>
  
  <pre><code>$query= mysql_query("SELECT surname FROM users WHERE name = 'Michael'")  
  or die  
  (mysql_error());   
  
  while($zeile = mysql_fetch_array( $query )) 
  { 
      echo $zeile['surname']."&lt;br&gt;";
  }  
  </code></pre>
  
  <p><strong>Now this is about PHP, but what about DELPHI?</strong> I have the same database and want to show the surname of the user but I dont even know how to connect with DELPHI (<strong>and it should also support Firemonkey and work on iOS</strong>).</p>
  
  <p>Sorry for the grammar misstakes I made.</p>
  
  <p>Thanks for all incoming answers and regards from germany.</p>