SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I have a problem, in a script called ssLinks the SQL file has this line: link_desc text,
    What do I enter in the Lenght/Set field? if I don't enter anything it returns an SQL error in phpMyAdmin!

    If it's a description field, what should I set it to? it's for a link description.

    Thanks!
    CG Focus

    Focusing On CG Graphics.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It shouldn't return an error, you should be able to put TEXT without a length, is there another error? Are you using phpMyAdmin to create the table or ar eyou inserting an SQL statement right into phpMyAdmin?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am in phpMyAdmin...I don't know how to use SQL outside this.

    Here is the error message:
    "You have an error in your SQL syntax near 'desc TEXT not null , hits INT (11) DEFAULT '0' not null , totalrate INT (11) ' at line 1"

    here is the whole SQL page and I add these infos directly off phpMyAdmin...the first table was created successfully.

    # Table structure for table 'sslinkcats'

    CREATE TABLE sslinkcats (
    lcat_id int(11) NOT NULL auto_increment,
    lcat_cat int(11) DEFAULT '0' NOT NULL,
    lcat_name varchar(100) NOT NULL,
    lcat_header text,
    lcat_ranking int(11),
    PRIMARY KEY (lcat_id)
    );

    # Table structure for table 'sslinks'

    CREATE TABLE sslinks (
    link_id int(11) NOT NULL auto_increment,
    link_cat int(11) DEFAULT '0' NOT NULL,
    link_name varchar(100) NOT NULL,
    link_url varchar(255) NOT NULL,
    link_desc text,
    link_hits int(11) DEFAULT '0' NOT NULL,
    link_totalrate int(11),
    link_numvotes int(11),
    link_dateadd int(11),
    link_addemail varchar(255),
    link_addname varchar(100),
    link_validated char(3),
    link_recommended char(3) DEFAULT 'no' NOT NULL,
    PRIMARY KEY (link_id)
    );
    CG Focus

    Focusing On CG Graphics.

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So the table gets created correct? How are you showing the structure that phpMyAdmin created if the table isn't being created?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh! no..no...what I show you is the SQL file within ssLinks's directory...the one that came with the script. As I don't know how to use it with MySQL I simply made the tables and fields from within the web based admin panel.

    Cheers!
    CG Focus

    Focusing On CG Graphics.

  6. #6
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flywaver
    Oh! no..no...what I show you is the SQL file within ssLinks's directory...the one that came with the script. As I don't know how to use it with MySQL I simply made the tables and fields from within the web based admin panel.
    Ok im assuming "web based admin" means PHPMyAdmin, what you should be doing (if you arent) is pasting that sql into the textarea that has "Run SQL query/queries on database test [Documentation]:" written above it, then clcik go.
    It worked for me...

    Hope that helps!
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  7. #7
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or learn how to use the commandline mysql interface!
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  8. #8
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is all i have in reply to that freddy
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  9. #9
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok it worked by pasting the text in "Run SQL query/queries"

    Thanks and Cheers!
    CG Focus

    Focusing On CG Graphics.


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
  •