TAILIEUCHUNG - Practical PHP and MySQLBuilding Eight Dynamic Web Applications phần 2

sẽ cần thay đổi duy nhất một hồ sơ duy nhất để điều chỉnh các thể loại, và sau đó thay đổi sẽ được phản ánh trong tất cả các hồ sơ có liên quan. Nếu bạn sử dụng các bảng riêng biệt, bạn có thể kết hợp thông tin nhiều hơn với các thể loại. Không có lý do bạn không thể thêm các trường bổ sung trong bảng danh mục sau | CHAPTER 2 Getting Started with PHP and MySQL 39 would need to change only a single record to adjust the category and then the changes would be reflected in all related records. If you use separate tables you can associate more information with the category. There is no reason you could not add extra fields in the categories table later to add features such as a description of the category category icon translated definitions and more. A big reason for extracting data into separate tables is ease of use. If you have a single table with a huge number of fields it looks a lot more complex and difficult to deal with. It is better to have a number of simple smaller tables. If you spread your data across a number of smaller tables your database will perform more efficiently because it will not need to trudge through endless amounts of irrelevant data. Separating your information into different tables has a number of benefits and it is certainly the right way to develop database-driven applications. You will see many examples of how this separation of data across tables works throughout the book. Creating the Database The next step is to actually turn this theory into something you can see touch and work with. To do this you need to make use of your database client. In this example you will make use of phpMyAdmin a tool included with XAMPP to create the database. First open your Web browser and connect to phpMyAdmin by accessing http localhost phpmyadmin . A login screen displays in response. If you have only just installed MySQL or XAMPP use the username root with no password. If you are working on a shared computer change your root password by first connecting to the server with the following command mysql -u root mysql Now issue the following SQL query SET PASSWORD FOR root@localhost PASSWORD chinnyraccoon Obviously replace the password in the parentheses with your own password. After you have logged into phpMyAdmin you will see a frame on the left side of the screen .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
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.