Đang chuẩn bị liên kết để tải về tài liệu:
Phát triển web với PHP và MySQL - p 29

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Advanced MySQL CHAPTER 11 255 If you leave the database parameter off, the SHOW COLUMNS statement will default to the database currently in use. You can also use the table.column notation: show columns from books.orders; 11 ADVANCED MYSQL One other very useful variation of the SHOW statement can be used to see what privileges a user has. For example, if we run the following, we’ll get the output shown in Figure 11.1: show grants for bookorama; +------------------------------------------------------------------------------------------------+ | Grants for bookorama@% | +------------------------------------------------------------------------------------------------+ |GRANT USAGE ON *.* TO 'bookorama'@'%' IDENTIFIED BY PASSWORD '6a87b6810cb073de' | |GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON books.* TO 'bookorama'@'%' |. | Advanced MySQL 255 Chapter 11 If you leave the database parameter off the SHOW COLUMNS statement will default to the database currently in use. You can also use the table.column notation show columns from books.orders One other very useful variation of the SHOW statement can be used to see what privileges a user has. For example if we run the following we ll get the output shown in Figure 11.1 show grants for bookorama ------------------------------------------------------------------------------------ Grants for bookorama@ ------------------------------------------------------------------------------------ GRANT USAGE ON . TO bookorama S IDENTIFIED BY PASSWORD 6a87b6810cb073 de GRANT SELECT INSERT UPDATE DELETE CREATE DROP INDEX ALTER ON books. TO bookorama @ ----------------------------------------------------------------------------------- Figure 11.1 The output of the SHOW GRANTS statement. The GRANT statements shown are not necessarily the ones that were executed to give privileges to a particular user but rather summary equivalent statements that would produce the user s current level of privilege. 11 Advanced MySQL Note The SHOW GRANTS statement was added in MySQL version 3.23.4 if you have an earlier version this statement won t work. There are many other variations of the SHOW statement. A summary of all the variations is shown in Table 11.6. Table 11.6 SHOW Statement Syntax Variation SHOW DATABASES LIKE database SHOW TABLES FROM database LIKE table Description Lists available databases optionally with names like database. Lists tables from the database currently in use or from the database called database if specified optionally with table names like table. Using MySQL 256 Part II Table 11.6 Continued Variation Description SHOW COLUMNS FROM table FROM database LIKE column Lists all the columns in a particular table from the database currently in use or from the database specified optionally with column names like column. You might use SHOW FIELDS instead

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.