Sitemap
Table of ContentsBackCover
Build Your Own Database Driven Website Using PHP & MySQL
Introduction
What''s In This Book
The Book''s Web Site
The SitePoint Forums
The SitePoint Tech Times
Your Feedback
Chapter 1: Installation
Windows Installation
Linux Installation
Mac OS X Installation
Post-Installation Setup Tasks
If Your Web Host Provides PHP and MySQL
Your First PHP Script
Summary
Chapter 2: Getting Started with MySQL
Logging On to MySQL
So what''s SQL?
Creating a Database
Creating a Table
Inserting Data into a Table
Viewing Stored Data
Modifying Stored Data
Deleting Stored Data
Summary
Chapter 3: Getting Started with PHP
Basic Syntax and Commands
Variables and Operators
Arrays
User Interaction and Forms
Control Structures
Multipurpose Pages
Summary
Chapter 4: Publishing MySQL Data on the Web
Connecting to MySQL with PHP
Sending SQL Queries with PHP
Handling SELECT Result Sets
Inserting Data into the Database
A Challenge
Summary
" Homework " Solution
Chapter 5: Relational Database Design
Rule of Thumb: Keep Things Separate
Dealing with Multiple Tables
Simple Data Relationships
Many-to-Many Relationships
Summary
Chapter 6: A Content Management System
The Front Page
Managing Authors
Deleting Authors
Adding Authors
Editing Authors
Managing Categories
Managing Jokes
Summary
Chapter 7: Content Formatting and Submission
Out with the Old
Regular Expressions
String Replacement with Regular Expressions
Splitting Text into Pages
Putting it all Together
Automatic Content Submission
Summary
Chapter 8: MySQL Administration
Backing up MySQL Databases
MySQL Access Control
Checking and Repairing MySQL Data Files
Summary
Chapter 9: Advanced SQL
Setting LIMITs
LOCKing TABLES
Column and Table Name Aliases
GROUPing SELECT Results
LEFT JOINs
Limiting Results with HAVING
Summary
Chapter 10: Advanced PHP
Server-Side Includes with PHP
Semi-Dynamic Pages
Chapter 11: Storing Binary Data in MySQL
Binary Column Types
Storing Files
Viewing Stored Files
The Complete Script
Advanced Considerations
Summary
Chapter 12: Cookies and Sessions in PHP
PHP Sessions
A Simple Shopping Cart
Summary
Appendix A: MySQL Syntax
ALTER TABLE
ANALYZE TABLE
CREATE DATABASE
CREATE INDEX
CREATE TABLE
DELETE
DESCRIBE
DROP DATABASE
DROP INDEX
DROP TABLE
EXPLAIN
GRANT
INSERT
LOAD DATA INFILE
LOCK/UNLOCK TABLES
OPTIMIZE TABLE
RENAME TABLE
REPLACE
REVOKE
SELECT
SET
SHOW
UPDATE
USE
Appendix B: MySQL Functions
Mathematical Functions
String Functions
Date and Time Functions
Miscellaneous Functions
Functions for Use with GROUP BY Clauses
Appendix C: MySQL Column Types
Numerical Types
Character Types
Date/Time Types
Appendix D: PHP Functions for Working with MySQL
mysql_affected_rows
mysql_close
mysql_connect
mysql_create_db
mysql_data_seek
mysql_db_name
mysql_db_query
mysql_drop_db
mysql_errno
mysql_error
mysql_escape_string
mysql_fetch_array
mysql_fetch_assoc
mysql_fetch_field
mysql_fetch_lengths
mysql_fetch_object
mysql_fetch_row
mysql_field_flags
mysql_field_len
mysql_field_name
mysql_field_seek
mysql_field_table
mysql_field_type
mysql_free_result
mysql_get_client_info
mysql_get_host_info
mysql_get_proto_info
mysql_get_server_info
mysql_insert_id
mysql_list_dbs
mysql_list_fields
mysql_list_tables
mysql_num_fields
mysql_num_rows
mysql_pconnect
mysql_query
mysql_result
mysql_select_db
mysql_tablename
mysql_unbuffered_query
Index
Index_A
Index_B-C
Index_D
Index_E
Index_F
Index_G-H
Index_I
Index_J-L
Index_M
Index_N-O
Index_P
Index_Q-R
Index_S
Index_T
Index_U
Index_V-Z
List of Figures
List of Tables
List of Sidebars