Trooper Posted January 1, 2004 Share Posted January 1, 2004 Okay I have this code that checks to see if a table exists... [php:1:4304a899c6]<?php if(mysql_list_tables($dbname) != news){ CREATE TABLE news ( //<-- This is were the error is author VARCHAR(30) NOT NUUL, dateposted DATETIME NOT NULL, title VARCHAR(100) NOT NULL, content CHAR(99999) NOT NULL,) }?>[/php:1:4304a899c6]but when i go to the page i get this error... Parse error: parse error, unexpected T_STRING in C:httpduserstrooperindex.php on line 21[/quote ?>[/code] Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/ Share on other sites More sharing options...
shortkid422 Posted January 1, 2004 Share Posted January 1, 2004 I think that the table needs to be in quotes. [php:1:18aecfb026]<?php if(mysql_list_tables($dbname) != news){ CREATE TABLE \'news\' ( author VARCHAR(30) NOT NUUL, dateposted DATETIME NOT NULL, title VARCHAR(100) NOT NULL, content CHAR(99999) NOT NULL, ) } ?>[/php:1:18aecfb026] Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5207 Share on other sites More sharing options...
Trooper Posted January 1, 2004 Author Share Posted January 1, 2004 Nope, didn\'t work Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5208 Share on other sites More sharing options...
Trooper Posted January 2, 2004 Author Share Posted January 2, 2004 so no ones gonna help me eh? I feel, lonly. Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5213 Share on other sites More sharing options...
SWI03 Posted January 2, 2004 Share Posted January 2, 2004 NUUL is spelled wrong.. Null for the first instance of Null cant you just use MYSQL-Front or something to put the sql statements in there to make the table. or don\'t you have access to the database? Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5215 Share on other sites More sharing options...
Trooper Posted January 2, 2004 Author Share Posted January 2, 2004 Well, I have phpmyadmin. I guess I could do that. Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5225 Share on other sites More sharing options...
SWI03 Posted January 2, 2004 Share Posted January 2, 2004 well that will at least let ya know if it is your php syntax or sql ... maybe it was just that crazy word nuul... Link to comment https://forums.phpfreaks.com/topic/1591-creating-table-problem/#findComment-5226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.