Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pedidoNovembro ($table = null) {
- $found = null;
- try {
- $database = open_database();
- $sql = "SELECT count(dataPedido) FROM Pedido WHERE dataPedido BETWEEN '2017/11/01' AND '2017/11/30'";
- $result = $database->query($sql);
- if ($result->num_rows > 0) {
- $found = $result->fetch_assoc();
- }
- } catch (Exception $e) {
- $_SESSION['message'] = $e->GetMessage();
- $_SESSION['type'] = 'danger';
- }
- close_database($database);
- return $found;
- }
- $Novembro = pedidoNovembro(PEDIDO);
- print_r($Novembro);
- Array ( [count(dataPedido)] => 2 )
Add Comment
Please, Sign In to add comment