You are on page 1of 4

PHP + MySQL – 48hrs

Higher Certificate in OpenSource Web Developer (MySQL + PHP)

課程簡介
在開放原始碼運動內,除了操作系統的原始碼被公開外,另一熱門軟件的原始碼也是被大眾期待公開的,這軟件便是資料庫軟
件。其中最為有名的便是 MySQL 軟件,利用 MySQL 配合 Linux 或 UNIX 作業系統,便能建構出完整的系統架構,達到企業對
資訊管理的需求。
當 MySQL 的資料庫被建立後,如何建立動態網頁存取資料便成了下一個重要的課題,而配合這方面的程式語言便是 PHP
Supporting Language。利用 PHP,我們可以很容易編寫動態網頁,製作出實用的網上程式。

課程目標
本課程針對教授 MySQL 資料庫的安裝及管理,學員除了學習基本 SQL 指令的運用外,更可學懂資料庫保安、資料複製、資料備
份及還原。修畢課程,更可考取 MySQL 的 Core Certification 及 Certified MySQL Professional 的專業認證。除了 MySQL
的專業認證外,學員亦可考取 Zend 推出的 PHP 認證

課程內容
Module 1: PHP Programming
The Basics of PHP
— Introducing PHP — Identifiers
— PHP and HTML — Operators
— PHP and XML — Conditional structures
— PHP and databases — Iteration and loops
— Creating a PHP page — Functions
— Using PHP tags — Variable functions
— Language basics — Including files
— Constants and variables
Object-oriented PHP
— The basics of object oriented programming — Attributes
— Classes — Accessing objects, methods and attributes
— Instantiation and constructors — Implementing inheritance
PHP and the Web
— Creating HTML content using PHP — Cookies
— Client side and server side embedding PHP in HTML — The superarrays: accessing global information
— Creating forms — Session management
— GET and POST: accessing form variables
Arrays
— Variable collections: introducing arrays — Reordering
— Numerically indexed and associative arrays — Serializing arrays
— Multidimensional arrays — Manipulating arrays
— Sorting
Strings and Regular Expressions
— Formatting strings — Regular expressions
— Comparing strings — Extract in data from strings
— Modifying string contents — Joining and splitting strings
File Manipulation
— Opening a file — Closing a file
— Writing to a file — File locking
— Reading from a file
Managing Date and Time
— Dates in PHP — Date calculations
— Getting the current date — Dates and databases
— Converting a string into a date — Using the calendar functions
— More date functions — The UNIX epoch and the dangers of UNIX dates
Managing E-mail
— Sending e-mail — Formatting an e-mail message
— Managing the headers — Attaching a file to a message
PHP and Databases
— When to use a database — Extracting data
— Types of databases supported by PHP — Joining data
— Inserting data
Stream and Network Programming
— Using file wrappers — Blocking and non-blocking calls
— Connecting to a remote host using sockets — Creating and using streams
Security
— Trusted and untrusted input — Validating input
— Managing authentication — Preventing XSS attacks
— Escaping data for database and shell programming

Debugging and Performance Management


— Common programming mistakes — Avoiding bugs
— Programming logic — Avoiding performance pitfalls
— Creating good code — Troubleshooting performance bottlenecks

Module 2: MySQL Database Development


Client/Server Concepts
— Server SQL modes — Invoking Client programs
— General MySQL Architecture
The mysql Client Program
— The MySQL Prompts — mysql output formats
— Editing keys in mysql — Using Script Files with MySQL
— Client Commands and SQL statements — Using mysql interactively
— Statement Terminators — Using server-side help
— Using the --safe-updates Option
Connectors
— MySQL Client Interfaces — Connector/ODBC
— Connector/J — Connector/NET
Data Types
— Column Attributes — Numeric Data Types
— The BIT Data Type — String Data Types
— Temporal Data Types — Handling Missing or Invalid Data Values
— Using the AUTO_INCREMENT Column Attribute
Identifiers
— Reserved Words as Identifiers — Using Qualifed Names
— Identifier Syntax — Case Sensitivity
Databases
— Database properties — Creating Databases
— Altering Databases — Dropping Databases
— Obtaining Database Metatdata
Tables and Indexes
— Indexes — Emptying Tables
— Table Properties — Dropping Indexes
— Obtaining Table and Index Metatadata — Creating Tables
— Altering tables — Dropping Tables
Querying for Data
— Aggregating Results — Rows to Retrieve
— Using SELECT to retrieve data — Columns to Retrieve
— Using UNION — Grouping Results
SQL expressions
— Components of SQL expressions — Comments in SQL Statements
— String Expressions — Temporal Expressions
— Numeric Expressions — Functions in SQL expressions
— NULL values
Updating Data
— Update Operations — The UPDATE Statement
— Privileges Required for Update Statements — The DELETE and TRUNCATE TABLE Statements
— The INSERT Statement — The REPLACE Statement
Joins
— Multiple-Table UPDATE and DELETE Statements — Resolving Name Clashes Using Qualifiers and Aliase
— Writing Outer Joins — Writing Inner Joins
— Overview
Subqueries
— Subqueries as Scalar Expressions — Using Subqueries in Updates
— Converting Subqueries to Joins — Types of Subqueries
— Comparison Using Row Subqueries — Using Subqueries in the FROM Clause
— Correlated Subqueries — Comparing Subquery Results to Outer Query Columns
Views
— Dropping a view — Checking views
— Displaying information about views — Privileges for views
— Reasons to use views — Creating views
— Altering views
Importing and Exporting Data
— Importing and Exporting Using SQL — Import and Export Operations
— Importing and Exporting Data from the Command
Line
User Variables
— User Variable Syntax — User Variable Properties
Prepared Statements
— Executing — Preparing
— Using Prepared Statements from the mysql Client — Benefits of Prepared Statements
— Deallocating Prepared Statements
Stored Routines
— Defining Stored Routines — Stored Routine Privileges and Execution Security
— Obtaining Stored Routine Metadata — The Namespace for Stored Routines
— Differences Between Stored Procedures and Function — Invoking Stored Routines
— Dropping Stored Routines — Benefits of Stored Routines
— Creating Stored Routines — Altering Stored Routines
Triggers
— Destroying — Referring to Old and New Column Values
— Restrictions on Triggers — Creating
— Trigger Concepts — Reasons to Use Triggers
— Privileges Required for Triggers

Obtaining Database Metadata


— Using mysqlshow to Obtain Metadata — Using SHOW and DESCRIBE to Obtain Metadata
— Using INFORMATION_SCHEMA to Obtain Metadata — Overview of Metadata Access Methods
Debugging MySQL Applications
— The SHOW ERRORS Statement — The perror Utility
— Interpreting Error Messages — The SHOW WARNINGS Statement
Basic Optimizations
— Overview of Optimization Principles — Normalization
— Choosing Appropriate Storage Engines — General Query Enhancement
— Using Indexes for Optimization

You might also like