Skip to content

Instantly share code, notes, and snippets.

@ryansukale
Last active January 4, 2016 19:59
Show Gist options
  • Select an option

  • Save ryansukale/8671326 to your computer and use it in GitHub Desktop.

Select an option

Save ryansukale/8671326 to your computer and use it in GitHub Desktop.
A simple php snippet for querying data from a database using mysqli
$query="select * from your_table where";
$resultSet = mysqli_query($con,$query);
$size = mysqli_num_rows($resultSet);
if($size>0){
while($resultRow = mysqli_fetch_array($resultSet)){
$fieldValue = $resultRow['field_name'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment