You are not enjoying the benefits offered by registering. To register click here...
  
Forums | Prefs | Your Messages | Members | Recent | Search
Quick Search


Advanced Search
| Calendar | Doc | Dev' Blog! |
Chat (Alpha Version)

Guest, do not forget to login ( Register )
 Top > Forums > This Software > Support, FAQ, How-to's
 creating atable with XML

Skin Selection:
   
harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 26, 2006, 12:53 am by harmor
creating atable with XML
In my XML file I have
xml Code:
  1.  
  2.         <query>
  3.         "CREATE TABLE {$CONFIG->dbprfx}navlinks (
  4.        navlinkid int(10) unsigned NOT NULL auto_increment,
  5.        url varchar(200) NOT NULL default '',
  6.        title varchar(120) NOT NULL default '',[code=sql]
  7.        new_window tinyint(1) unsigned NOT NULL default '0',
  8.        alt varchar(120) NOT NULL default '',
  9.        image varchar(250) NOT NULL default '',
  10.        link_perms varchar(120) NOT NULL default '',
  11.        PRIMARY KEY  (navlinkid)
  12.        ) TYPE=MyISAM";
  13.         </query>


In my php file I have
php Code:
  1. $DB->query($query);


I always get this error
error Code:
  1. SQL Layer Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"CREATE TABLE {$CONFIG->dbprfx}navlinks ( navlinkid int(10) unsigned NOT N' at line 1
  2. Query [ "CREATE TABLE {$CONFIG->dbprfx}navlinks ( navlinkid int(10) unsigned NOT NULL auto_increment, url varchar(200) NOT NULL default '', title varchar(120) NOT NULL default '', new_window tinyint(1) unsigned NOT NULL default '0', alt varchar(120) NOT NULL default '', image varchar(250) NOT NULL default '', link_perms varchar(120) NOT NULL default '', PRIMARY KEY (navlinkid) ) TYPE=MyISAM";]
  3.  
  4.  


Here are the full scripts
Attachement
168.xml

Attachement
167.php


Last edit by harmor on Jul 26, 2006, 12:54 am
Xen Web Hosting Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more -------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.
 
Top

Posts in this Topic
creating atable with XML harmor Jul 26, 2006, 12:53 am
Re: creating atable with XML harmor Jul 26, 2006, 5:45 am
Re: creating atable with XML harmor Jul 26, 2006, 4:04 pm

  Flat Mode | Threaded Mode  
Quick Jump:

         
Page generated in 0.03 seconds (Queries: 0.01) - Cpu: 0.36
Total DB [adodb:mysql] queries: 15
Total Strings Translated: 8
Powered by NextBBS SE v0.4.5 - Copyright © 2007 CFR & The NextBBS Team
Chatbox powered by smiletag