Practical PHP and MySQLBuilding Eight Dynamic Web Applications phần 8

Các biến này theo dõi các dự án mà người dùng quan tâm. Đầu tiên, hãy kiểm tra để xem nếu SESS_PROJECTID đã được thiết lập và một dự án đã lựa chọn: Nếu biến đó tồn tại, trang chỉ đơn giản là chuyển hướng vào khối chính. Đầu tiên, hãy kiểm tra để xem nếu SESS_PROJECTID đã được thiết lập và một dự án đã lựa chọn | CHAPTER 9 FAQ Content Management System 351 For a normal user only the questions within the subject s that he owns should be returned modqsql SELECT questions. FROM users INNER JOIN questions on INNER JOIN topics on INNER JOIN subjects on WHERE 0 else modqsql SELECT questions. FROM users inner join questions on inner join topics on inner join subjects on WHERE 0 AND . _SESSION sEsS_USERID . Run the relevant query modqsql SELECT questions. FROM users inner join questions on inner join topics on inner join subjects on WHERE 0 AND . _SESSION SESS_USERID . modresult mysql_query modqsql Create a table and add the table headings modresult mysql_query modqsql echo h1 Questions submitted for moderation h1 echo table cellspacing 0 cellpadding 5 echo tr echo th Subject th echo th Topic th echo th Question th echo th Submitted By th echo td td echo td td echo td td echo tr If the query returns no results there are no questions to moderate echo td td echo tr if mysql_num_rows modresult 0 echo tr 352 Practical PHP and MySQL echo td colspan 7 No questions to moderate td echo tr If there are rows to moderate display the questions echo tr while row mysql_fetch_assoc modresult subsql SELECT FROM topics subjects WHERE AND . row topic_id . subresult mysql_query subsql subrow mysql_fetch_assoc subresult echo tr echo td . subrow subject . td echo td . subrow name . td echo td . row question . td echo td . row username . td echo td a href func details id . row id . Details a td echo td a href .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.