Skip to content

Instantly share code, notes, and snippets.

@tmbritton
Created July 25, 2012 20:53
Show Gist options
  • Save tmbritton/3178616 to your computer and use it in GitHub Desktop.
Save tmbritton/3178616 to your computer and use it in GitHub Desktop.
Execute MySQL Query
if($result = mysqli_query($link, $sql)){
while($row = mysqli_fetch_array($result)) {
//Do Stuff
}
} else {
echo mysqli_errno($link) . ": " . mysqli_error($link) . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment