Đang chuẩn bị liên kết để tải về tài liệu:
Giải pháp thiết kế web động với PHP - p 33

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

GETTING STARTED WITH MYSQL MySQL timestamps are based on a human-readable date and, since MySQL 4.1, use the same format as DATETIME. As a result, they are incompatible with Unix and PHP timestamps, which are based on the number of seconds elapsed since January 1, 1970. Don t mix them. Storing predefined lists MySQL lets you store two types of predefined list that could be regarded as the database equivalents of radio button and check box states: • • ENUM: This column type stores a single choice from a predefined list, such as “yes, no, don t know” or “male, female.” The maximum number of items. | GETTING STARTED WITH MYSQL MySQL timestamps are based on a human-readable date and since MySQL 4.1 use the same format as DATETIME. As a result they are incompatible with Unix and PHP timestamps which are based on the number of seconds elapsed since January 1 1970. Don t mix them. Storing predefined lists MySQL lets you store two types of predefined list that could be regarded as the database equivalents of radio button and check box states ENUM This column type stores a single choice from a predefined list such as yes no don t know or male female. The maximum number of items that can be stored in the predefined list is a mind-boggling 65 535 some radio-button group SET This column type stores zero or more choices from a predefined list. The list can hold a maximum of 64 choices. While ENUM is quite useful SET tends to be less so mainly because it violates the principle of storing only one piece of information in a field. The type of situation where it can be useful is when recording optional extras on a car or multiple choices in a survey. Storing binary data Storing binary data such as images isn t a good idea. It bloats your database and you can t display images directly from a database. However the following column types are designed for binary data TINYBLOB Up to 255 bytes BLOB Up to 64kB MEDIUMBLOB Up to 16MB LONGBLOB Up to 4GB With such whimsical names it s a bit of a letdown to discover that BLOB stands for binary large object. Chapter review Much of this chapter has been devoted to theory explaining the basic principles of good database design. Instead of putting all the information you want to store in a single large table like a spreadsheet you need to plan the structure of your database carefully moving repetitive information into separate tables. As long as you give each record in a table a unique identifier its primary key you can keep track of information and link it to related records in other tables through the use of foreign keys. The concept of .

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.