实际上我试图在数据表中获取登录用户的数据。实际上他们被分配给订单,我试图从数据库中获取他们作为员工(用户)的数据..所以,就像那样,当用户登录时,系统应该只显示登录用户的数据......它是显示来自数据库的行的总和,它在这里为不同用户的不同数据工作......$result= mysqli_query($connect,"SELECT SUM(paid) AS totalsum FROM orders WHERE employee_id='".$_SESSION['user']['user_id']."'");$row = mysqli_fetch_assoc($result); $sum = $row['totalsum'];但它不会获取登录用户的数据。(这些登录用户被分配为员工的数据,他们必须查看他们的记录才能采取行动)$sql = "SELECT order_id, order_date, client_name,client_contact,payment_status,client_address,mac_address,client_address2,series,user_status,connection_type FROM orders WHERE order_status = 1 AND employee_id = '".$_SESSION['user']."' ";$result = $connect->query($sql);$sql = "SELECT order_id, order_date, client_name,client_contact,payment_status,client_address,mac_address,client_address2,series,user_status,connection_type FROM orders WHERE order_status = 1 AND employee_id = '".$_SESSION['user']."' ";$result = $connect->query($sql);$sql = "SELECT order_id, order_date, client_name,client_contact,payment_status,client_address,mac_address,client_address2,series,user_status,connection_type FROM orders WHERE order_status = 1 AND employee_id = '".$_SESSION['user']."' ";$result = $connect->query($sql);数据表显示此错误数据表警告:表 id=manageOrderTable - JSON 响应无效。有关此错误的更多信息,请参阅http://datatables.net/tn/1
- 2 回答
- 0 关注
- 352 浏览
添加回答
举报
0/150
提交
取消