List:General Discussion« Previous MessageNext Message »
From:Eugene Kosov Date:April 7 2009 1:38pm
Subject:Re: PHP-MYSQL Question
View as plain text  
Perhaps you don't have permissions to create tables?

It would have been much clearer if your script was like this:

$result=mysql_query($your_create_table_statement);
if($result){ print"Successful";}
else {print "Unsuccessful: ".mysql_error()}


abdulazeez alugo wrote:
> 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.
> 
> _________________________________________________________________
> More than messages–check out the rest of the Windows Live™.
> http://www.microsoft.com/windows/windowslive/


-- 
С уважением,
Евгений Косов
Thread
PHP-MYSQL Questionabdulazeez alugo7 Apr
  • Re: PHP-MYSQL QuestionEugene Kosov7 Apr
    • RE: PHP-MYSQL Questionabdulazeez alugo7 Apr
      • Re: PHP-MYSQL QuestionEugene Kosov7 Apr
        • RE: PHP-MYSQL Questionabdulazeez alugo7 Apr
          • Re: PHP-MYSQL QuestionEugene Kosov7 Apr
            • RE: PHP-MYSQL Questionabdulazeez alugo7 Apr
              • Re: PHP-MYSQL QuestionSpiros Papadopoulos7 Apr
                • RE: PHP-MYSQL Questionabdulazeez alugo7 Apr
                  • RE: PHP-MYSQL Questionabdulazeez alugo7 Apr