-
-
Save darkcolonist/10ca03d87efe1f9dbfd1380b40ae9237 to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result = $conn->query($sql); | |
if ($result->num_rows > 0) { | |
$showHeader = true; | |
$firstRow = $result->fetch_assoc(); | |
if ( true === $showHeader ) { // to achieve a 'single header' | |
$showHeader = false; // avoid other headers | |
echo 'Receipt #: ' . $firstRow[0]['info'] . '<br><br>'; | |
echo 'Table #: ' . $firstRow['tid'] . '<br>'; | |
echo 'Client #: ' . $firstRow['cid'] . '<br>'; | |
echo 'Date: ' . date('Y-m-d h:i A', strtotime($firstRow['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