SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL or phpMyAdmin problem

    Been having trouble with the manual set-up of .sql files using phpMyAdmin through my ISP.

    When contacting technical support, i'm being told that the problem seems to be with the SYNTAX of what it's been sent through phpMyAdmin.

    Now, being new to php and mysql, i've taken an interest in testing various open source CMS, and practically all the ones that don't have a built-in install script give me an error.

    In the example below, is an error message for the latest of the CMS applications i've been trying out.

    "MySQL said:
    You have an error in your SQL syntax near '\'100\' NOT NULL,
    ancestors char(160) default NULL,
    description char(250' at line 7

    Here is the original content of that section of .sql file:

    CREATE TABLE constant (
    id char(16) NOT NULL,
    group_id char(16) NOT NULL,
    name char(150) NOT NULL,
    value char(255) NOT NULL,
    class char(16),
    pri smallint(5) DEFAULT '100' NOT NULL,
    ancestors char(160) default NULL,
    description char(250) default NULL,
    short_id int(11) NOT NULL auto_increment,
    PRIMARY KEY (id),
    KEY group_id (group_id),
    KEY short_id(short_id)
    );


    Now, technical support is asking me why there is a need for the '100' in single quotes, asking me what does the '100' do. I don't know, as i said, i'm new to this and i'm hoping that someone here can help me with this. By the way, just about ALL the .sql scripts that i've had to post manually gave me a similar error message. I've told tech support that it might be the single or double quotes, but then again, why do the ones that come with their install scripts work?

    Hope someone can help me out.

    Thanks in advance.
    Last edited by Mr_H; Sep 12, 2002 at 11:06.

  2. #2
    SitePoint Zealot Selatos's Avatar
    Join Date
    Aug 2002
    Location
    USA
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    umm, how high does smallint go? I dont know if it will go to one hundred. Only using int, and unsigned int myself, I cant help much, but try that. Change the smallint to int

  3. #3
    Forum Mathematics Geek Agent Dwarf's Avatar
    Join Date
    Aug 2002
    Location
    Commonwealth of Pennsylvania
    Posts
    232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit: Seems to work for me. *shrug*
    Last edited by Agent Dwarf; Sep 12, 2002 at 17:15.


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
  •