Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2017 09:25
Show Gist options
  • Save anonymous/e28f52cc6d26321ec413f8d9ab058ea5 to your computer and use it in GitHub Desktop.
Save anonymous/e28f52cc6d26321ec413f8d9ab058ea5 to your computer and use it in GitHub Desktop.
test
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$showHeader = true;
if ( true === $showHeader ) { // to achieve a 'single header'
$showHeader = false; // avoid other headers
echo 'Receipt #: ' . $row[0]['info'] . '<br><br>';
echo 'Table #: ' . $row['tid'] . '<br>';
echo 'Client #: ' . $row['cid'] . '<br>';
echo 'Date: ' . date('Y-m-d h:i A', strtotime($row['date'])) . '<br>';
}
while($row = $result->fetch_assoc()) {
$oid = $row{'oid'};
$product = $row['pname'];
$groupidx = $row['groupid'];
$printreceipt = $row['printreceipt'];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment