Product Overview
Build Your Own Database Driven Website Using PHP & MySQL
Table Of Contents
- Here's a look at the table of contents:
- Preface
- Who Should Read This Book
- What’s In This Book
- The Book’s Website
- The Code Archive
- Updates and Errata
- The SitePoint Forums
- The SitePoint Newsletters
- Your Feedback
- Installation
- Windows Installation
- Installing MySQL
- Installing PHP
- Linux Installation
- Removing Packaged Software
- Installing MySQL
- Installing PHP
- Mac OS X Installation
- Installing MySQL
- Installing PHP
- Mac OS X and Linux
- Post-Installation Setup Tasks
- If Your Web Host Provides PHP and MySQL
- Your First PHP Script
- Summary
- Windows Installation
- Getting Started with MySQL
- An Introduction to Databases
- 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
- Getting Started with PHP
- Introducing PHP
- Basic Syntax and Commands
- Variables and Operators
- Arrays
- User Interaction and Forms
- Control Structures
- Multipurpose Pages
- Summary
- Publishing MySQL Data on the Web
- A Look Back at First Principles
- Connecting to MySQL with PHP
- Sending SQL Queries with PHP
- Handling
SELECTResult Sets - Inserting Data into the Database
- A Challenge
- Summary
- “Homework” Solution
- Relational Database Design
- Giving Credit where Credit is Due
- Rule of Thumb: Keep Things Separate
- Dealing with Multiple Tables
- Simple Relationships
- Many-to-Many Relationships
- Summary
- A Content Management System
- The Front Page
- Managing Authors
- Deleting Authors
- Adding Authors
- Editing Authors
- Magic Quotes
- Managing Categories
- Managing Jokes
- Searching for Jokes
- Adding Jokes
- Editing and Deleting Jokes
- Summary
- Content Formatting and Submission
- Out with the Old
- Regular Expressions
- String Replacement with Regular Expressions
- Boldface and Italic Text
- Paragraphs
- Hyperlinks
- Matching Tags
- Splitting Text into Pages
- Putting it all Together
- Automatic Content Submission
- Summary
- MySQL Administration
- Backing up MySQL Databases
- Database Backups using
mysqldump - Incremental Backups using Update Logs
- Database Backups using
- MySQL Access Control
- Using
GRANT - Using REVOKE
- Access Control Tips
- Locked Out?
- Using
- Checking and Repairing MySQL Data Files
- Summary
- Backing up MySQL Databases
- Advanced SQL Queries
- Sorting
SELECTQuery Results - Setting
LIMITs LOCKingTABLES- Column and Table Name Aliases
GROUPingSELECTResultsLEFT JOINs- Limiting Results with
HAVING - Summary
- Sorting
- Binary Data
- Semi-Dynamic Pages
- Handling File Uploads
- Assigning Unique File Names
- Recording Uploaded Files in the Database
- Binary Column Types
- Storing Files
- Viewing Stored Files
- The Complete Script
- Large File Considerations
- MySQL Packet Size
- PHP Script Timeout
- Summary
- Cookies and Sessions in PHP
- Cookies
- PHP Sessions
- A Simple Shopping Cart
- Summary
- Structured PHP Programming
- What is Structured Code?
- The Need for Structured Code
- Include Files
- Types of Includes
- Including HTML Content
- Locating Include Files
- Returning from Includes
- Custom Functions and Function Libraries
- Variable Scope and Global Access
- Optional and Unlimited Arguments
- Constants
- Structure In Practice: Access Control
- Summary
- 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
- Joins
- Unions
- SET
- SHOW
- UNLOCK TABLES
- UPDATE
- USE
- MySQL Functions
- Control Flow Functions
- Mathematical Functions
- String Functions
- Date and Time Functions
- Miscellaneous Functions
- Functions for Use with
GROUP BYClauses
- MySQL Column Types
- Numerical Types
- Character Types
- Date/Time Types
- PHP Functions for Working with MySQL
mysql_affected_rowsmysql_client_encodingmysql_closemysql_connectmysql_create_dbmysql_data_seekmysql_db_namemysql_db_querymysql_drop_dbmysql_errnomysql_errormysql_escape_stringmysql_fetch_arraymysql_fetch_assocmysql_fetch_fieldmysql_fetch_lengthsmysql_fetch_objectmysql_fetch_rowmysql_field_flagsmysql_field_lenmysql_field_namemysql_field_seekmysql_field_tablemysql_field_typemysql_free_resultmysql_get_client_infomysql_get_host_infomysql_get_proto_infomysql_get_server_infomysql_infomysql_insert_idmysql_list_dbsmysql_list_fieldsmysql_list_processesmysql_list_tablesmysql_num_fieldsmysql_num_rowsmysql_pconnectmysql_pingmysql_querymysql_real_escape_stringmysql_resultmysql_select_dbmysql_statmysql_tablenamemysql_thread_idmysql_unbuffered_query
- Index
Now that you realize this book can advance you how can you possibly go wrong investing $39.95 on something that can dramatically change the course of your career?
Buy ANY SitePoint Book — Get A PDF FREE!
That's right, order ‘Build Your Own Database Driven Website Using PHP & MySQL’ TODAY and grab ANY PDF you like — FREE!
3rd Edition
3rd Edition NOW Available!
What's New?
- All-new coverage of PHP 5.0 keeps up to date with the latest best practices in PHP
- New screenshots throughout the book show you how it’s done visually
- A new chapter on building structured programming that teaches you to build an access control system in PHP
- Revised and expanded throughout
- All known errors in the previous edition now corrected
- 58 pages longer






