SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    At My Desk!!
    Posts
    1,642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create table query playing up

    Hey Guys, I have never created a table from a script before so am not posotive im doing it right (although its straight forward). Here is my code:

    PHP Code:
    $installquery  mysql_query("CREATE TABLE cCms_Site_News (
    `Id` int(6) unsigned NOT NULL auto_increment,
    `newName` varchar(255) default NULL,
    `newDate` int(11) default NULL,
    `newContent` blob,
    `newLive` varchar(4) default NULL,
    PRIMARY KEY  (`Id`)) 
    ENGINE=MyISAM DEFAULT CHARSET=latin1"
    ) or die(mysql_error());
                                    
    $result_installnews mysql_query($installquery) or die(mysql_error());

    if (
    $result_installnews) { 
    This creates the table ok, but I get a message saying, Please check you mysql manual for the right syntax to use near '1'.

    Whats going on? Also the code inside the if statement is not being executed

    Thanks in advance
    "Am I the only one doing ASP.NET in Delphi(Pascal)?"

  2. #2
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    At My Desk!!
    Posts
    1,642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    haha, long day I have the query in the variable and im using mysql_query on it
    "Am I the only one doing ASP.NET in Delphi(Pascal)?"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •