Review for the final


  1. Databases

    1. Transactions

    2. ACID properties

    3. Difference between a table and a database

    4. Indexes, good or bad?

    5. 3rd normal form and eliminating inconsistency

  2. SQL

    1. select

    2. insert
      insert into tablename values ('a', 1, '3.0');

    3. joins
      select * from table1, table where column1 = column2;

    4. subqueries
      select * from table where column IN/= (select colname from table);

    5. like
      select * where name like “steve”;

    6. Delete

      delete from tablename where blah blah blah

    7. Create
      create table steve(name char(10));

    8. Types

      1. numeric types

      2. Date types

      3. blob/longblob

      4. char[n] vs varchar[n]

      5. Money types

      6. not null

      7. default

      8. autoincrement

    9. What is an SQL injection attack (i.e. little bobby tables)

  3. Regular Expressions

    1. ?

    2. *

    3. +

    4. .

    5. /s /S /w /W /d /D etc.

    6. $ and ^

    7. [abc]

    8. [a|b|c]

    9. abc{1,4}

    10. modifiers like “/steve/i”

  4. Regular Expression PHP Methods

    1. preg_match and preg_match_all

    2. preg_replace

    3. preg_split

  5. PHP

    1. Loops

      1. for

      2. foreach($arrays as $item)

      3. foreach($array as $item=>$key)

      4. while

      5. do while

    2. variables

      1. local vs class vs global vs superglobal

      2. builtin variables like $_COOKIES $_REQUEST $_GET etc.

      3. $_SERVER

    3. methods and functions

      1. Names not case sensitive!

      2. how do you declare a return type?

      3. How do you make a default parameter?

      4. How do you force a parameter to be a type?

        http://www.php.net/manual/en/language.oop5.typehinting.php

    4. Objects

      1. constructors __construct()

        1. Does not call the superclass's constructor.
          parent::__construct

      2. destructors __destruct()

        1. Does not call the superclass's destructor

          parent::__destruct()

    5. files

      1. fopen and fread and fclose

      2. file and maybe implode

      3. works on URLS and files and such.

      4. What if your file is named “http://www.server.com”???

    6. Arrays

      1. remember, arrays are really has tables!

      2. remember, arrays are really has tables!

    7. ToString

    8. die

    9. string concatenation

    10. MYSQL

      1. mysql_real_escape_string

      2. mysql_connect

      3. mysql_query

    11. print_r


  1. Cookies

    1. Uses

    2. Size limit

    3. what to do if turned off

    4. Can they be trusted?

    5. When can you set them in PHP

  2. Images

    1. lossless vs lossy

    2. png vs gif

  3. HTTP

    1. GET vs POST

    2. What gets cached

    3. How do you turn off caching

    4. the header command

    5. Compression – just know it can happen

  4. Imagemaps

    1. <img src=blah usenmap=#thing>

    2. <area shape=ploygon coords=”1,2,3,4,5,6”>

    3. <area shape=circle coords=”1,2,3”>

    4. <area shape=rect coords=”1,2,3,4”>

    5. </map>