Question: Im getting an error in phpmyadmin creating these tables, but i don't know why

```
DROP TABLE customer, reservation;
CREATE TABLE customer(
    id          INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
    customer_ID VARCHAR(30) NOT NULL,
    f_name      VARCHAR(30) NOT NULL,
    l_name      VARCHAR(30) NOT NULL,
    address     VARCHAR(100) NOT NULL,
    email       VARCHAR(100) NOT NULL,
    phone       VARCHAR(11) NOT NULL
);
CREATE TABLE reservation(
    r_id        INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
    customer_ID VARCHAR(30) NOT NULL,
    book_date   DATE NOT NULL CHECK (book_date <= now()),
    s_time      DOUBLE NOT NULL,
    e_time      DOUBLE NOT NULL,
    amount      INTEGER NOT NULL,
    FOREIGN KEY (customer_ID) REFERENCES customer(customer_ID) 
);

```

Any ideas?

EDIT: #1005 - Can't create table 'test.reservation' (errno: 150)

Answer: 
In C++11 you can use range based for which is similar to method 2, but standard.

<http://www2.research.att.com/~bs/C++0xFAQ.html#for>
While I think the syntax of the second option is clearer, I'd personally prefer to avoid it since it's based on an earlier version of the draft standard and hence seems liable to change in the future. YMMV though since it's mostly a question of taste.