Skip to content

Instantly share code, notes, and snippets.

@jopfre
Created December 9, 2016 20:40
Show Gist options
  • Save jopfre/5a1d359e94dcd030c25b41576392150f to your computer and use it in GitHub Desktop.
Save jopfre/5a1d359e94dcd030c25b41576392150f to your computer and use it in GitHub Desktop.
$query="SELECT * FROM word WHERE day = current_date() LIMIT 1";
$result = mysql_query($query);
if ($result) {
// echo "Query executed";
$row = mysql_fetch_assoc($result);
$word = $row['word'];
$definition = $row['definition'];
$definitionB = $row['definitionB'];
} else {
echo "Query not executed";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment