Advanced Web Development Intensive
Advanced PHP with MySql

INFO1-CE9803 / INFO1-CE9420
Spring 2015

Professor:Sam Sultan [sam.sultan@nyu.edu]
Class website: [workshop.sps.nyu.edu/~sultans/php2] (or) [samsultan.com/php2]
Office hours: By Appointment
Course Dates: 4/11/2015 - 4/25/2015
Course Days: Saturdays
Course Hours: 9:00am - 6:00pm
Location: 7 East 12th Street - room 228

Announcement(s):

+outline
+books
+grades policy
+final project
+student listing
+homework submission
+demos PHP
+demos MySql
+student feedback
+student evaluation & comments

Prequisite Knowledge - intro PHP / intro SQL  
Session - 1a   1b   1c   1d   1e   1f   2a   2b   2c   2d   2e   3a   3b   3c   3d  


SQL - PHP - MySQL Manual - SFTP (download) - WAMP (download) - MySQL GUI (download) - PHP*Tester © - SQL*Tester ©
Site Helpful?

COURSE DESCRIPTION:

Learn how to code object-oriented PHP, and combine your knowledge of PHP and MySQL to deliver professional websites. Discover advanced SQL coding techniques, such as SELECT sub-queries, views, and stored procedures. Become familiar with proper database design using data normalization techniques, and learn how to create and administer database instances, users, hosts, and security to allow your clients to create and manage their own environments. The course also covers advanced PHP techniques, including managing file systems and directories, parsing RSS feeds, uploading files, building shopping carts, e-mailing, and processing images.


COURSE LEARNING GOALS:

1. Course Objectives:

The objective of this course is to advance your basic knowledge of PHP and MySql. The course will cover advance topics such as using the SQL CASE expression, using SQL sub-queries, creating views, creating users, understanding the MySql data dictionary, importing and exporting your databases, creating persistent state on the web using cookies and other techniques, designing and normalizing your data and creating databases, accessing files and directories, writing proper PHP recursive processing, emailing and uploading, and learning how to write object oriented PHP.

The focus of the course will be on the following topics:

2. Student Learning Outcomes:


COURSE REQUIREMENTS AND POLICIES:

See [Requirements and Policies]


BOOKS - (Required / Suggested)


GRADES AND GRADING POLICY


Details of Assignment and Evaluation.

How to Submit Homeworks.

- Homework assignments are always due the next session we meet.
- Print out your homework code and output and bring with you to class the next time we meet.
- I will either collect, or will ask students to discuss their solutions in class.
- I will not accept homework via email unless you are not able to attend the class.
- For PHP, proper indentation is a must. If not properly indented I may return it without grading it.
- Multiple pages should be stapled together.

Grades are FINAL.

Please do not negotiate for a better grade. If you are expecting to receive a grade of an "A" at the end of the semester, then I expect you to attend all sessions (unless I am notified ahead of time), to participate in these sessions, to keep up with the class reading material, and to complete your homework assigments. This will ensure that you stay current with the class content, and will ensure that you get a good grade on your test(s), project as well as your final grade.

If you are not interested in a grade, or you do not submit your homeworks/project or take the exams, then you will receive a grade of an "NE" (Non-Evaluative). A grade of NE is final, and cannot be changed. A grade of NE cannot be applied as partial fulfillment for any NYU certificate program.

NYU/SPS Grading Scale -

GradeVerbal InterpretationGardation, Conversion and Scale
A Exceptional work
Superior effort
A = 93-100 = 4.0
A- = 90-92 = 3.7
(there is no A+)
B Very good work B+ = 87-89 = 3.3
B = 83-86 = 3.0
B- = 80-82 = 2.7
C Satisfactory work C+ = 77-79 = 2.3
C = 73-76 = 2.0
C- = 70-72 = 1.7
(mininum passing grade)
F Fail. Unsatisfactory work F = below 70 = 0.0
IP Incomplete -
Failure to complete assigned work
(see note below)
IF Incomplete Fail -
Failure to complete assigned work
(see note below)

Notes for IP and IF -

Grade IP - Work to date was passing. Incomplete Pass (IP) may be granted only in extraordinary extenuating circumstances. It is not given automatically but only when it is deemed to have met the criteria and when a contract is signed by both the student and faculty prior to the end of the course. Pre-approval by the Academic Department is required before an Incomplete Grade can be awarded. Students must have completed at least 50% of the course to be considered for an IP. If the terms of the IP are not met within the time frame stated on the contract, the grade will convert to an F and cannot be changed or further appealed. Students will have to retake the course.

NOTE: A student who receives an IP grade may not simply retake a test or exam already taken. The student must do additional new work to remove the IP as outlined in the contract. There is a grade point deduction from the overall grade for late submission of work.

Grade IF - Work to date was failing. Students must have completed at least 50% of the course to receive an Incomplete. An IF that is not removed by the established time in the Contract becomes an F and cannot be changed or further appealed. Students will have to retake the course.

Please Note: The Office of the University Registrar maintains individual records of students enrolled in NYU and is the only department authorized to record an official grade. Final grades are reported on NYU-Albert.
For more information: http://www.sps.nyu.edu/academics/academic-policies-and-procedures/graduate-academic-policies-and-procedures.html


To receive your final grade at the end of the semester, follow these steps:

  1. click on http://www.sps.nyu.edu/academics/noncredit-offerings/academic-noncredit-policies-and-procedures.html#Obtaining_Grades
  2. Log into Albert using your net id, at: https://admin.portal.nyu.edu/psp/paprod/EMPLOYEE/EMPL/h/?tab
  3. Click on "Student Center"
  4. Within your student center, in the "academics" section click on the dropdown: "other academic"
  5. From the dropdown select "grades"
  6. For complete instructions click here


COURSE OUTLINE:

DATE SESSION TOPIC[s] COVERED
 
[Week 1] 1a Working with PHP Strings
String Functions
Working with Numbers
Number Functions
Working with Dates
Date Functions
Working with Arrays
Array Functions

Reading: Chapter 3, 4, 5 (PHP and MySQL Web Development)
 
[Week 1] 1b Selecting data from multiple tables
The join construct
Old vs. new join syntax
Normal or Inner join
Cross join - Cartesian product
Outer join vs. Inner join
What is a Self Join
Performance considerations

Reading: Chapter 5 (Teach Yourself SQL in One Hour a Day)
 
[Week 1] 1c Database Design
The Logical and Physical Model
Understanding data normalization
First normal form
Second normal form
Third normal form
Pros & cons of data normalization
Denormalizing data
Entiry relationships
One-to-one relationship
One-to-many relationship
Many-to-many relationship
Designing a One-to-Many self-join relationship
Designing a Many-to-Many self-join relationship

Reading: Chapter 8 (Teach Yourself SQL in One Hour a Day)
 
[Week 1] 1d Creating database objects
What is a primary key?
What is a foreign key?
What is an index?
Creating tables
SQL data types
Adding a primary key
Adding constraints
Creating Indexes
Altering table definition
Droping tables

Reading: Chapter 9, 10, 15 (Teach Yourself SQL in One Hour a Day)
 
[Week 1] 1e Manipulating data in tables
Adding data with the INSERT statement
INSERT with a SELECT statement
Changing data with the UPDATE statement
UPDATE with a SELECT statement
Removing data with the DELETE statement
DELETE with a SELECT statement
The TRUNCATE statement
The REPLACE statement

Reading: Chapter 11 (Teach Yourself SQL in One Hour a Day)
 
[Week 1] 1f Accessing HTML form data
The GET method
The POST method
Connecting PHP to a database
Inserting, Updating & Deleting from databases
Querying databases

Reading: Chapter 11 (PHP and MySQL Web Development)
 
[Week 2] 2a What is WAMP, MAMP or LAMP?
Downloading and Installing WAMP
Launching WAMP services
What is DocumentRoot?
Accessing Resources using Localhost
Using phpMyAdmin to manage a database
Configuring httpd.conf, php.ini, and my.ini files

Reading: None
 
[Week 2] 2b SQL built-in Functions
Numeric functions - ABS, FLOOR, ROUND, TRUNCATE
String functions - CONCAT, LOWER, LENGTH, SUBSTR, REPLACE
Aggregate functions - COUNT, SUM, AVG, MIN, MAX
Using the CASE expresion
Date functions - Current date, date manipulation, date formatting

Reading: Chapter 7, 12 (Teach Yourself SQL in One Hour a Day)
 
[Week 2] 2c The SQL SELECT Clauses
The FROM clause
The WHERE clause
Grouping with GROUP BY clause
The HAVING clause
Sorting with the ORDER BY clause

Reading: Chapter 4 (Teach Yourself SQL in One Hour a Day)
 
[Week 2] 2d Select Sub-Queries
Using Subqueries for filtering
Using Subqueries as inline views
Using Subqueries as additional derived columns
Correlated Subqueries

Reading: Chapter 6 (Teach Yourself SQL in One Hour a Day)
 
[Week 2] 2e PHP Reading and Writing to files
File Permissions (read, write, execute)
Accessing Directory Structures
Interacting with Files Attributes
Sorting multi-dimensional arrays Uploading Files
Emailing Data
Executing System Level Commands

Reading: Chapter 18 (PHP and MySQL Web Development)
 
 
[Week 3] 3a
  • Creating Persistence on the Web
  • Repopulating From Fields
  • Using Hidden Fields
  • Using the End of the URL
  • Using Cookies
  • Creating and Using Sessions

  • Reading: Chapter 22
     
    [Week 3] 3b What is an Object
    What is a Class
    Creating Classes
    Adding Attributes and Methods
    Adding a Constructor
    Data Encapsulation
    Accessing Attributes and Methods

    Reading: Chapter 6 (PHP and MySQL Web Development)
     
    [Week 3] 3c Creating and using views
    The purpose of views
    Using the Data Dictionary
    The show statement
    Loading data from a file
    Unloading data into a file
    Importing a database or table(s)
    Exporting a database of table(s)

    Reading: Chapters 13, 18 (Teach Yourself SQL in One Hour a Day)
     
    [Week 3] 3d What are Stored Procedures
    Stored Procedures, Functions & Triggers
    Creating Stored Procedures
    Calling Stored Procedures
    Creating Variables
    Global Variables
    Creating code blocks
    Conditional Testing- IF, CASE
    Loops and iterations - LOOP, WHILE, REPEAT
    Procedures with non-SELECT statements
    Using Unbounded SELECT statements
    Using SELECT INTO statements
    Using SELECT with cursor statements
    Calling Stored Procedures from PHP

    Reading: None
     



    All contents © Sam Sultan.
    For more information, send e-mail to: sam.sultan@nyu.edu