Skip to content

Instantly share code, notes, and snippets.

@bcamarneiro
Created April 22, 2014 15:14
Show Gist options
  • Save bcamarneiro/11183164 to your computer and use it in GitHub Desktop.
Save bcamarneiro/11183164 to your computer and use it in GitHub Desktop.
Return single value from mysqli PHP
$name = $mysqli->query("SELECT name FROM contacts WHERE id = 5")->fetch_object()->name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment