dbConnection(); $user = "SELECT COUNT(`id`) as total_user FROM `user`"; $user = $conn->prepare($user); $user->execute(); $user = $user->fetch(PDO::FETCH_ASSOC); $order = "SELECT COUNT(`order_id`) as total_order FROM `order`"; $order = $conn->prepare($order); $order->execute(); $order = $order->fetch(PDO::FETCH_ASSOC); $product = "SELECT COUNT(`product_id`) as total_product FROM `product`"; $product = $conn->prepare($product); $product->execute(); $product = $product->fetch(PDO::FETCH_ASSOC); $total_user = $user['total_user']; $total_order = $order['total_order']; $total_product = $product['total_product']; // print_r($total_user); // print_r($total_order); // print_r($total_product); ?>

Dashboard

Orders

Products

Customers