1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

database help needed??

Discussion in 'MySQL' started by kanwarjot, Jun 21, 2007.

  1. #1
    Hi webmasters,

    `nameid` varchar(255) NOT NULL default '',

    Actually this is a part of my database which I was creating today. But mysql said there is an error but I can't find it anywhere. Please tell me whats wrong in this command. Also I can't change 'nameid' word.
    Thanks alot, KJS.
     
    kanwarjot, Jun 21, 2007 IP
  2. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what error did you get?

    would you mind posting the entire mysql query you ran? usually the error happens on a line before the one that is returned by mysql :)
     
    UnrealEd, Jun 21, 2007 IP
  3. kanwarjot

    kanwarjot Notable Member

    Messages:
    3,256
    Likes Received:
    283
    Best Answers:
    0
    Trophy Points:
    230
    #3
    ok sir i will do that
     
    kanwarjot, Jun 21, 2007 IP
  4. kanwarjot

    kanwarjot Notable Member

    Messages:
    3,256
    Likes Received:
    283
    Best Answers:
    0
    Trophy Points:
    230
    #4

    this is what i get...any help?
     
    kanwarjot, Jun 21, 2007 IP
  5. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    what was the error you got from mysql? just a regular syntax error? or was it something else?

    At first sight there doesn't seem to be anything wrong with it, maybe you can try removing default '' from each line, but i don't think that's causing the error
     
    UnrealEd, Jun 21, 2007 IP
  6. kanwarjot

    kanwarjot Notable Member

    Messages:
    3,256
    Likes Received:
    283
    Best Answers:
    0
    Trophy Points:
    230
    #6
    this is what i get


     
    kanwarjot, Jun 22, 2007 IP
  7. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i've tested it on my server with this code:
    CREATE TABLE `funny` (
    `id` int( 10 ) NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR( 255 ) NOT NULL default '',
    PRIMARY KEY ( `id` )
    )
    Code (markup):
    and all works fine, the table is created without any problem
     
    UnrealEd, Jun 22, 2007 IP
    kanwarjot likes this.
  8. kanwarjot

    kanwarjot Notable Member

    Messages:
    3,256
    Likes Received:
    283
    Best Answers:
    0
    Trophy Points:
    230
    #8
    thanks unreal rep added....but still my prob is not solved..i don know whats the error
     
    kanwarjot, Jun 22, 2007 IP
  9. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #9
    i created this table, hope it helps:

    CREATE TABLE `funny` (
    `id` int(10) NOT NULL auto_increment,
    `name` varchar(255) NOT NULL default '',
    `nameid` varchar(255) NOT NULL default '',
    `desc` varchar(255) NOT NULL default '',
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    sawz, Jun 22, 2007 IP
  10. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #10
    in your third reply, the word money appeared right before the sql queries. Is this a typo? or what do you need it for?

    Also, since mysql said the error started around "CREATE TABLE", would you mind posting the sql query before the CREATE TABLE?

    Also: you did post a different sql query than the one where an error occured, cause the tablenames don't match ;)
     
    UnrealEd, Jun 22, 2007 IP
  11. kanwarjot

    kanwarjot Notable Member

    Messages:
    3,256
    Likes Received:
    283
    Best Answers:
    0
    Trophy Points:
    230
    #11
    thanks for all you support.... i got the ans :)..
     
    kanwarjot, Jun 22, 2007 IP
  12. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #12
    yeah, and it seems you got banned as well.
     
    sawz, Jun 22, 2007 IP