Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Creating table in MySQL db

    I have this
    PHP Code:
    CREATE TABLE `email2` ( `emailVARCHAR255 NOT NULL ,' . ' `nameVARCHAR255 NOT NULL ,' . ' PRIMARY KEY ( `email` ) ,' . ' INDEX ( `name` ) ) 
    but it isn't working...
    Last edited by gsnedders; 06-07-2004 at 09:43 PM.

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I dont understand, why do you have those ' . ' s in there?

  • #3
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    It was made with phpMyAdmin...

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Go through the phpMyAdmin wizard and create a table with that setup and then copy the outputted SQL code... If it doesnt work in your script then the chances are your database connection is failing.

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Also, next time when something "doesn't work", show us the error.

  • #6
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by Nightfire
    Also, next time when something "doesn't work", show us the error.
    There was no error, it just didn't create it...

  • #7
    New Coder
    Join Date
    Jun 2004
    Location
    Newcastle, England
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeh probably just no error because you didn't check for an error tho .

    How are you actually passing that in your script? Show us a couple of lines of code, with the query etc. Those ' . ' bits are probably screwing it up for a start, but don't know for sure until i see the code.

  • #8
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by MrShed
    How are you actually passing that in your script? Show us a couple of lines of code, with the query etc. Those ' . ' bits are probably screwing it up for a start, but don't know for sure until i see the code.
    I know the rest works, it's tested with 2 other commands

  • #9
    New Coder
    Join Date
    Jun 2004
    Location
    Newcastle, England
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeh im not saying it doesnt work....but give us a bit of the context of the query to work with. For example what uve given us isn't php code at all.
    Beauty is in the eye of the beer-holder

    Man who smoke pot, choke on handle


  •  

    Posting Permissions

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