tailieunhanh - MySQL /PHP Database Applications Second Edition phần 6

hoặc luật bất kỳ dễ dàng hơn. Tuy nhiên, không có ngôn ngữ kịch bản hoặc cơ sở dữ liệu quan hệ được trang bị tốt hơn trong các lĩnh vực này. Nhưng nếu bạn đang làm việc cho một công ty bán hoặc phân phát hàng hóa, nó là một sự đảm bảo ảo rằng ai đó một nơi nào đó là có được không hài lòng với những gì ông đã nhận được. | 360 Part IV Not So Simple Applications drop table if exists story_versions create table story_versions story_id integer not null modify_dt timestamp modify_by varchar 20 not null stage_id integer not null publish_dt date null headline varchar 255 null subtitle varchar 255 null byline_prefix varchar 20 null summary text null body text null primary key story_id modify_dt foreign key story_id references stories story_id on delete cascade type InnoDB drop table if exists user_seq create table user_seq id int not null auto_increment primary key id type InnoDB drop table if exists user_stage_map create table user_stage_map user_id integer not null stage_id integer not null primary key user_id stage_id index stage_id user_id foreign key user_id references users user_id on delete cascade foreign key stage_id references stages stage_id on delete cascade type InnoDB drop table if exists users create table users Chapter 11 Content-Management System 361 user_id integer not null auto_increment username varchar 20 not null password varchar 16 not null name varchar 50 not null email varchar 255 null primary key user_id -- unique username type InnoDB Code Overview At this point we assume that you are getting comfortable with the way the applications in this book have been constructed. Even with the simple safe_ mysql_query function in the guestbook example you saw the usefulness of having a standard way of working with PHP s native MySQL routines. The built-in routines will let you do what you need to do no question. But in the course of using them you may find that you re writing the same kind of code multiple times a sure signal that some higher-level functions are called for. Also should you ever want to port your code to a different DBMS for some crazy reason like because you re being paid to going through your code and converting those MySQL-specific functions to some other system can be a big pain. If you ve ever done any work with Perl you may be familiar with the DBI .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
13    158    1    30-12-2024