prepare('SELECT t.*, COUNT(ti.id) AS total_products FROM transactions t JOIN transactions_items ti ON ti.txn_id = t.txn_id WHERE cast(t.created as DATE) = cast(now() as DATE) GROUP BY t.id, t.txn_id, t.payment_amount, t.payment_status, t.created, t.payer_email, t.first_name, t.last_name, t.address_street, t.address_city, t.address_state, t.address_zip, t.address_country, t.account_id, t.payment_method, t.discount_code, t.shipping_method, t.shipping_amount ORDER BY t.created DESC'); $stmt->execute(); $orders = $stmt->fetchAll(PDO::FETCH_ASSOC); // Get the orders statistics $stmt = $pdo->prepare('SELECT SUM(payment_amount) AS earnings FROM transactions WHERE payment_status = "Completed" AND cast(created as DATE) = cast(now() as DATE)'); $stmt->execute(); $order_stats = $stmt->fetch(PDO::FETCH_ASSOC); // Get the total number of accounts $stmt = $pdo->prepare('SELECT COUNT(*) AS total FROM accounts'); $stmt->execute(); $accounts = $stmt->fetch(PDO::FETCH_ASSOC); // Get the total number of products $stmt = $pdo->prepare('SELECT COUNT(*) AS total FROM products'); $stmt->execute(); $products = $stmt->fetch(PDO::FETCH_ASSOC); ?>

Dashboard

View statistics, today's transactions, and more.

New Orders

New Sales

Total Accounts

Total Products

Today's Transactions

List of transactions for today.

# Customer Email Products Total Method Status Date Actions
There are no recent orders
View Edit