Skip to content

Instantly share code, notes, and snippets.

@jeserkin
Created May 2, 2013 22:31
Show Gist options
  • Select an option

  • Save jeserkin/5505989 to your computer and use it in GitHub Desktop.

Select an option

Save jeserkin/5505989 to your computer and use it in GitHub Desktop.
/* retrieve all rows from myCity */
$query = "SELECT Name, CountryCode, District FROM myCity";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_row()) {
printf("%s (%s,%s)\n", $row[0], $row[1], $row[2]);
}
/* free result set */
$result->close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment