Skip to content

Instantly share code, notes, and snippets.

@arthurschreiber
Created February 17, 2012 21:24
Show Gist options
  • Save arthurschreiber/1855553 to your computer and use it in GitHub Desktop.
Save arthurschreiber/1855553 to your computer and use it in GitHub Desktop.
<?php
// 1
$server = 'localhost';
$user = 'root';
$password = '';
// 2
$connect = mysql_connect($server,$user,$password);
$sql = 'SELECT * FROM Lieblingsspieler WHERE Land = Frankreich';
// 3
mysql_select_db('Meine_Datenbank',$connect);
$result = mysql_query($sql);
// 4
while($i = mysql_fetch_array($result)) {
// 5
echo $i[0].' aus '.$i[1].', war zuletzt bei '.$i[2].'<br />';
// 6
}
mysql_close($connect);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment