Expert PHP and MySQL
By: Andrew Curioso, Ronald Bradford, Patrick Galbraith
Contributors: Bradford, Ronald; Galbraith, Patrick
Series: Wrox expert
Publisher: Wiley Pub.
Published: 2010
Place of publication: Indianapolis, IN
Language: eng
Number of pages: 587
ISBN-13: 9780470563120
Subjects: MySQL (Electronic resource); PHP (Computer language); PHP (Computer program language)
Description: Looks at the techniques of creating applications using PHP with MySQL, with information on such topics as design patterns, complex queries, iterators, closures, caching, PHP extensions, and Sphinx.
Notes: "Wrox programmer to programmer"--Cover.

Includes index.
Table of contents: title: Introduction
pagenum: XXIX; label: Chapter 1
title: Techniques Every Expert Programmer Needs to Know
pagenum: 1; title: Object-Oriented PHP
pagenum: 2; title: Instantiation and Polymorphism
pagenum: 2; title: Interfaces
pagenum: 7; title: Magic Methods and Constants
pagenum: 8; title: Design Patterns
pagenum: 11; title: Using MySQL Joins
pagenum: 20; title: INNER JOIN
pagenum: 22; title: OUTER JOIN
pagenum: 24; title: Other JOIN Syntax
pagenum: 26; title: Complex Joins
pagenum: 27; title: MySQL Unions
pagenum: 28; title: GROUP BY in MySQL Queries
pagenum: 30; title: WITH ROLLUP
pagenum: 31; title: HAVING
pagenum: 32; title: Logical Operations and Flow Control in MySQL
pagenum: 33; title: Logic Operators
pagenum: 33; title: Flow Control
pagenum: 34; title: Maintaining Relational Integrity
pagenum: 35; title: Constraints
pagenum: 36; title: NOT NULL
pagenum: 36; title: UNSIGNED
pagenum: 36; title: ENUM and SET
pagenum: 37; title: UNIQUE KEY
pagenum: 37; title: FOREIGN KEY
pagenum: 38; title: Using Server SQL Modes
pagenum: 41; title: Storage Engine Integrity
pagenum: 45; title: What MySQL Does Not Tell You
pagenum: 46; title: What's Missing?
pagenum: 46; title: Subqueries in MySQL
pagenum: 46; title: Subquery
pagenum: 46; title: Correlated Subquery
pagenum: 47; title: Derived Table; title: Using Regular Expressions
pagenum: 49; title: General Patterns
pagenum: 50; title: Expert Regular Expressions
pagenum: 52; title: Putting It All Together in PHP
pagenum: 55; title: Regular Expressions in MySQL
pagenum: 60; title: Summary
pagenum: 63; label: Chapter 2
title: Advanced PHP Concepts
pagenum: 65; title: A Problem That Needs Solving
pagenum: 65; title: Iterators and the SPL
pagenum: 67; title: A Sample View for the Application
pagenum: 67; title: The Iterator Interface
pagenum: 69; title: The Countable Interface
pagenum: 73; title: The SeekableIterator Interface and Pagination
pagenum: 75; title: The ArrayAccess Interface
pagenum: 77; title: Lambda Functions and Closures
pagenum: 78; title: The Old Way: Lambda-Style Functions
pagenum: 78; title: Understanding Closures
pagenum: 81; title: Using the Query Builder for Prototyping
pagenum: 83; title: Summary
pagenum: 85; label: Chapter 3
title: MySQL Drivers and Storage Engines
pagenum: 87; title: MySQL Drivers
pagenum: 88; title: About MySQL Storage Engines
pagenum: 89; title: Obtaining Storage Engine Information
pagenum: 89; title: Default Storage Engines
pagenum: 93; title: MyISAM
pagenum: 93; title: InnoDB
pagenum: 97; title: Memory
pagenum: 103; title: Blackhole
pagenum: 108; title: Archive
pagenum: 109; title: Merge
pagenum: 110; title: CSV
pagenum: 112; title: Federated
pagenum: 112; title: Other MySQL Supplied Engines
pagenum: 118; title: Falcon
pagenum: 118; title: Maria
pagenum: 120; title: Pluggable Engines
pagenum: 121; title: InnoDB Plugin
pagenum: 121; title: PBXT
pagenum: 122; title: XtraDB
pagenum: 123; title: Engines As Standalone Products
pagenum: 124; title: InfiniDB
pagenum: 124; title: TokuDB
pagenum: 124; title: Infobright
pagenum: 125; title: Other MySQL Offerings
pagenum: 125; title: Storage Engine Patch Products
pagenum: 125; title: MySQL-Related Products
pagenum: 126; title: Other Engines
pagenum: 127; title: Integrated Hardware Engines
pagenum: 128; title: Other Solutions
pagenum: 128; title: Wafflegrid
pagenum: 129; title: Summary
pagenum: 129; label: Chapter 4
title: Improving Performance Through Caching
pagenum: 131; title: eAccelerator and APC
pagenum: 132; title: Installing and Configuring APC
pagenum: 132; title: Installing and Configuring eAccelerator
pagenum: 133; title: User Cache
pagenum: 134; title: Checking the Cache Status
pagenum: 135; title: When to Use APC and eAccelerator
pagenum: 138; title: memcached
pagenum: 139; title: What Is memcached?
pagenum: 139; title: What memcached Does for You
pagenum: 139; title: How Does memcached Work?
pagenum: 139; title: How to Use memcached
pagenum: 141; title: What Is Gearman?
pagenum: 144; title: Caching Strategies
pagenum: 144; title: Installing memcached
pagenum: 145; title: Starting memcached
pagenum: 148; title: Startup Scripts
pagenum: 149; title: Testing Your memcached Installation
pagenum: 151; title: memcached Clients
pagenum: 153; title: Libmemcached
pagenum: 153; title: Libmemcached Features
pagenum: 154; title: Libmemcached Utility Programs
pagenum: 154; title: Installing Libmemcached
pagenum: 155; title: Libmemcached Utility Programs
pagenum: 155; title: memcat
pagenum: 156; title: memflush
pagenum: 156; title: memcp
pagenum: 157; title: memstat
pagenum: 157; title: memrm
pagenum: 157; title: memslap
pagenum: 157; title: memerror
pagenum: 158; title: PECL/Memcached
pagenum: 160; title: Connecting, Instantiation
pagenum: 162; title: Setting Client Behavior
pagenum: 162; title: Putting and Retrieving Data
pagenum: 163; title: Append and Prepend
pagenum: 166; title: Delete
pagenum: 168; title: Increment and Decrement
pagenum: 168; title: Multi-get
pagenum: 169; title: Multi-set
pagenum: 170; title: Cache Locality Using byKey Methods and Multi get/set
pagenum: 171; title: GetDelayed
pagenum: 173; title: CAS
pagenum: 174; title: Statistics
pagenum: 176; title: Server List
pagenum: 178; title: Error Handling
pagenum: 178; title: Practical Caching
pagenum: 180; title: Memcached Proxy: Moxi
pagenum: 185; title: Other "Memcapable" Key-Value Stores
pagenum: 186; title: Tokyo Tyrant
pagenum: 187; title: Summary
pagenum: 188; label: Chapter 5
title: Memcached and MySQL
pagenum: 191; title: The Memcached Functions for MySQL
pagenum: 191; title: How the Memcached Functions for MySQL Work
pagenum: 192; title: Installing the Memcached Functions for MySQL
pagenum: 193; title: Prerequisites
pagenum: 193; title: Configure the Source
pagenum: 194; title: Build the Source
pagenum: 194; title: Install the UDF
pagenum: 195; title: Checking Installation
pagenum: 196; title: Using the Memcached Functions for MySQL
pagenum: 196; title: Establishing a Connection to the Memcached Server
pagenum: 197; title: Data Setting Functions
pagenum: 198; title: Data Fetching Functions
pagenum: 204; title: Increment and Decrement
pagenum: 204; title: Behavioral Functions
pagenum: 206; title: Statistical Functions
pagenum: 209; title: Version Functions
pagenum: 211; title: Fun with Triggers (and UDFs)
pagenum: 212; title: Read-Through Caching with Simple Select Statements
pagenum: 216; title: Updates
pagenum: 219; title: Summary
pagenum: 220; label: Chapter 6
title: Advanced MySQL
pagenum: 221; title: Views
pagenum: 221; title: Access Permissions
pagenum: 223; title: Additional Information about Views
pagenum: 225; title: Stored Procedures and Functions
pagenum: 226; title: General Attributes
pagenum: 226; title: Stored Routine Logic
pagenum: 228; title: Using Stored Routines Privileges and Meta Data
pagenum: 230; title: Extending Stored Routines
pagenum: 231; title: Stored Routine Disadvantages
pagenum: 231; title: User Defined Functions
pagenum: 231; title: Triggers
pagenum: 232; title: No Triggers
pagenum: 233; title: Trigger Syntax
pagenum: 233; title: Insert Triggers
pagenum: 233; title: Update Triggers
pagenum: 234; title: Delete Triggers
pagenum: 235; title: Replace Triggers
pagenum: 236; title: Trigger Permissions
pagenum: 237; title: Transactions
pagenum: 237; title: Atomicity
pagenum: 238; title: Consistency
pagenum: 240; title: Isolation
pagenum: 242; title: Durability
pagenum: 247; title: Implied Commit
pagenum: 250; title: Replication
pagenum: 250; title: Replication Purposes
pagenum: 250; title: Replication Setup
pagenum: 251; title: Testing MySQL Replication
pagenum: 254; title: How Does MySQL Replication Work?
pagenum: 259; title: Important Configuration Options
pagenum: 260; title: Important Replication Commands
pagenum: 261; title: Breaking Replication
pagenum: 262; title: Using Replication Selectively
pagenum: 263; title: The Issues with MySQL Replication
pagenum: 264; title: The Benefits of MySQL Replication
pagenum: 264; title: Events
pagenum: 264; title: Creating Events
pagenum: 265; title: Enabling the Events Scheduler
pagenum: 267; title: Altering Events
pagenum: 268; title: Event Privileges
pagenum: 269; title: Event Meta Data
pagenum: 269; title: Summary
pagenum: 270; label: Chapter 7
title: Extending MySQL with User-Defined Functions
pagenum: 271; title: Introduction to UDFs
pagenum: 272; title: Developing a UDF
pagenum: 273; title: UDF Development Requirements
pagenum: 273; title: UDF Required Functions
pagenum: 274; title: A Practical UDF Example
pagenum: 274; title: UDF High-Level Design
pagenum: 275; title: Designing an Algorithm to Use for Your UDF
pagenum: 277; title: Implementing the Program
pagenum: 277; title: Building the UDF
pagenum: 292; title: Installing the UDF
pagenum: 294; title: Running Your New UDF
pagenum: 295; title: Using a UDF with PHP
pagenum: 296; title: Connecting and Disconnecting to MySQL
pagenum: 296; title: Returning the Result Set Array
pagenum: 297; title: Other UDF SQL Statements
pagenum: 300; title: Debugging a UDF
pagenum: 300; title: Attaching gdb to an Already Running Process
pagenum: 301; title: Setting a BreakPoint and Stepping through Code
pagenum: 302; title: Dealing with Literal Values
pagenum: 304; title: Debugging Summary
pagenum: 304; title: Summary
pagenum: 305; label: Chapter 8
title: Writing PHP Extensions
pagenum: 307; title: Setting Up the Build Environment
pagenum: 308; title: Creating an Extension with ext_skel
pagenum: 309; title: Creating and Compiling Skeleton Code
pagenum: 309; title: Using a Function Definitions File
pagenum: 312; title: Generating Help Files
pagenum: 313; title: Creating an Extension with CodeGen_PECL
pagenum: 314; title: Creating the Basic XML File
pagenum: 314; title: Defining Functions
pagenum: 316; title: Defining Constants, INI Directives, and Globals
pagenum: 318; title: Defining Objects, Methods, and Properties
pagenum: 319; title: Variables in PHP Extensions
pagenum: 321; title: Setting and Testing zvals
pagenum: 323; title: Reading and Comparing zvals
pagenum: 324; title: Dealing with Strings as zvals
pagenum: 326; title: Advanced Memory Management
pagenum: 328; title: Using Functions in Extensions
pagenum: 329; title: Basic Definitions
pagenum: 329; title: Using Arguments
pagenum: 331; title: Defining Argument Information
pagenum: 334; title: Returning Values
pagenum: 334; title: Built-In Functions
pagenum: 335; title: Creating and Consuming PHP API Functions
pagenum: 336; title: More Notes and Creating Helper Functions
pagenum: 339; title: Input/Output
pagenum: 340; title: Standard Out
pagenum: 340; title: Files and Streams
pagenum: 341; title: Networking
pagenum: 344; title: Errors and Warnings
pagenum: 346; title: Arrays and Hash Tables
pagenum: 347; title: Building and Accessing Arrays
pagenum: 347; title: Accessing and Modifying Hash Tables
pagenum: 349; title: Objects and Interfaces
pagenum: 349; title: Creating a Class
pagenum: 350; title: Interacting with Objects
pagenum: 355; title: Constants, INI Directives, and Globals
pagenum: 357; title: Constants
pagenum: 357; title: Globals and INI Directives
pagenum: 358; title: Describing an Extension
pagenum: 361; title: Printing a Description
pagenum: 361; title: Building a Table
pagenum: 362; title: Specifying a Logo
pagenum: 362; title: Summary
pagenum: 364; label: Chapter 9
title: Full-Text Searching
pagenum: 365; title: MySQL Fulltext Indexes
pagenum: 365; title: Using MySQL Fulltext Indexes
pagenum: 367; title: MySQL Fulltext Index Issues
pagenum: 368; title: A Better Solution: The Sphinx Full-Text Search Engine
pagenum: 370; title: Sphinx Configuration and Installation
pagenum: 371; title: Sphinx.conf Settings
pagenum: 382; title: Starting Sphinx
pagenum: 383; title: Searching Sphinx
pagenum: 385; title: Delta Indexes
pagenum: 389; title: Merging Indexes
pagenum: 394; title: Developing Applications That Use Sphinx
pagenum: 395; title: Sphinx and PHP
pagenum: 399; title: Summary
pagenum: 400; label: Chapter 10
title: Multi-Tasking in PHP and MySQL
pagenum: 401; title: Gearman
pagenum: 401; title: What Is Gearman?
pagenum: 402; title: Installing and Running Gearman
pagenum: 404; title: Using the Gearman MySQL UDFs
pagenum: 407; title: PHP and Gearman
pagenum: 409; title: Narada: A Search Engine Application
pagenum: 412; title: Obtaining Narada
pagenum: 413; title: Narada Components
pagenum: 413; title: Database Tables for the Search Engine Application
pagenum: 415; title: Sphinx Setup
pagenum: 416; title: Gearman Workers
pagenum: 429; title: Index Page
pagenum: 435; title: One Other Tidbit of Code
pagenum: 438; title: The Big Picture
pagenum: 439; title: Running Narada
pagenum: 439; title: To-Do List for Narada
pagenum: 440; title: Other Job Server Systems
pagenum: 442; title: Summary
pagenum: 442; label: Chapter 11
title: Rewrite Rules
pagenum: 443; title: Using Rewrite Rules
pagenum: 444; title: Understanding the Purpose and Structure of Rewrite Rules
pagenum: 444; title: Understanding and Controlling Rewrite Rule Flow
pagenum: 445; title: Conditional Rules
pagenum: 447; title: Logging and Optimization
pagenum: 450; title: Rewrite Maps
pagenum: 451; title: Built-In Maps
pagenum: 451; title: Random and Text Lookups
pagenum: 452; title: Using PHP and MySQL
pagenum: 452; title: Summary
pagenum: 456; label: Chapter 12
title: User Authentication
pagenum: 457; title: Designing the Database
pagenum: 458; title: HTTP-Based Authentication
pagenum: 460; title: Basic Authentication
pagenum: 461; title: Digest Authentication
pagenum: 463; title: Pure PHP Authentication
pagenum: 466; title: Using PHP Sessions
pagenum: 467; title: Building Secure Cookies
pagenum: 471; title: Access Control Lists
pagenum: 473; title: Summary
pagenum: 475; label: Chapter 13
title: Understanding the INFORMATION_SCHEMA
pagenum: 477; title: Using the INFORMATION_SCHEMA
pagenum: 478; title: Table Objects Tables
pagenum: 479; title: Other Database Objects Tables
pagenum: 481; title: MySQL Status Tables
pagenum: 482; title: PROCESSLIST (5.1)
pagenum: 482; title: SESSION_STATUS/GLOBAL_STATUS (5.1)
pagenum: 484; title: SESSION_VARIABLES/GLOBAL_VARIABLES (5.1)
pagenum: 485; title: MySQL Meta Data Tables
pagenum: 486; title: CHARACTER_SETS
pagenum: 486; title: COLLATIONS
pagenum: 487; title: COLLATION_CHARACTER_SET_APPLICABILITY
pagenum: 488; title: MySQL ACL Permissions Tables
pagenum: 488; title: USER_PRIVILEGES
pagenum: 488; title: SCHEMA_PRIVILEGES
pagenum: 489; title: TABLE_PRIVILEGES
pagenum: 489; title: COLUMN_PRIVILEGES
pagenum: 490; title: INFORMATION_SCHEMA Extensions
pagenum: 491; title: SHOW Cross Reference
pagenum: 491; title: Summary
pagenum: 492; label: Chapter 14
title: Security
pagenum: 493; title: Hardening Your MySQL Server
pagenum: 494; title: Installation Defaults
pagenum: 494; title: Operating System Security
pagenum: 495; title: MySQL Security Permissions
pagenum: 500; title: Additional Database Security
pagenum: 500; title: Auditing
pagenum: 501; title: Encoding Data
pagenum: 501; title: Bi-directional Encoding
pagenum: 505; title: Single-Directional Encoding
pagenum: 506; title: PHP Security Recipes
pagenum: 506; title: Protecting against SQL Injection
pagenum: 507; title: Protecting against Replay Attacks
pagenum: 509; title: Protecting against XSS
pagenum: 511; title: Protecting against CSRF
pagenum: 514; title: Automation Attacks
pagenum: 516; title: Summary
pagenum: 517; label: Chapter 15
title: Command-Line and Web Services
pagenum: 517; title: Creating Command-Line Scripts
pagenum: 517; title: Reading Command-Line Input
pagenum: 518; title: Prompting for Input
pagenum: 520; title: Completed Classes
pagenum: 521; title: Setting Up Cron Jobs
pagenum: 522; title: Bonus: Output in Color
pagenum: 523; title: Creating Web Services
pagenum: 524; title: RESTful Web Services
pagenum: 524; title: SOAP Web Services
pagenum: 532; title: Getting Started with the SOAP Library
pagenum: 533; title: Summary
pagenum: 541; label: Chapter 16
title: Optimization and Debugging
pagenum: 543; title: Debugging PHP
pagenum: 543; title: Creating Stack Traces
pagenum: 544; title: Optimizing Queries
pagenum: 545; title: Reducing SQL
pagenum: 545; title: Identifying SQL Statements
pagenum: 545; title: Optimizing SELECT
pagenum: 546; title: Optimizing UPDATE
pagenum: 556; title: Optimizing DELETE
pagenum: 556; title: Optimizing INSERT
pagenum: 558; title: Optimizing REPLACE
pagenum: 558; title: INSERT ... ON DUPLICATE KEY UPDATE
pagenum: 558; title: Debugging MySQL
pagenum: 560; title: Error Log
pagenum: 560; title: Slow Query Log
pagenum: 561; title: Processlist
pagenum: 562; title: Other Commands
pagenum: 564; title: Using a Debugger with MySQL
pagenum: 564; title: Summary
pagenum: 565; title: Index
pagenum: 567