Re: PHP-MYSQL Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This isn't PHP but mysql question.

You didn't mention that the table itslef is created or not. If not, then it is probably a mysql error,
maybe your installation of mysql doesn't support INNODB.

SanTa

----- Original Message ----- From: "abdulazeez alugo" <defatigue@xxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Tuesday, April 07, 2009 3:05 PM
Subject:  PHP-MYSQL Question



Hi guys,

Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful.



$result=mysql_query("CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
           table1_id INT NOT NULL,
            name VARCHAR(100) NOT NULL,
           school VARCHAR(100) NOT NULL,
           comment TEXT NOT NULL,
           entrydate TIMESTAMP NOT NULL,
           FOREIGN KEY(table1_id) REFERENCES table1(table1_id))
           ENGINE = INNODB" );

if($result){ print"Successful";}
else {print "Unsuccessful";}



Thanks in advance. Cheers.

Alugo Abdulazeez.


_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux