• Lucid Dreaming - Dream Views




    Results 1 to 7 of 7
    1. #1
      !DIREKTOR! Adam's Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Aquanina's closet
      Posts
      5,194
      Likes
      34

      Make a table in db

      Hey guys,

      Back again for more tech help!

      I have a database set up on my server, and the guy who usually sorts everything like this out for me is away travelling. So I downloaded this script to put a ratings system on my website, but stumped at the first instruction:

      Quote Originally Posted by readme.txt
      INSTALLATION:

      ================================================== ===========================
      1. Make your table for the ratings in your db (you should be able to copy
      and paste the following SQL)
      ================================================== ===========================
      CREATE TABLE `ratings` (
      `id` varchar(11) NOT NULL,
      `total_votes` int(11) NOT NULL default 0,
      `total_value` int(11) NOT NULL default 0,
      `used_ips` longtext,
      PRIMARY KEY (`id`)
      ) TYPE=MyISAM AUTO_INCREMENT=3;
      How do I do this? I thought it might be as simple as uploading something to the server to create this?

      Anyone know what I am talking about lol

      Thanks again guys

    2. #2
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      what you've got there is called a database query
      you need to execute it

      Do you have phpMyAdmin on your website?
      (\_ _/)
      (='.'=)
      (")_(")

    3. #3
      !DIREKTOR! Adam's Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Aquanina's closet
      Posts
      5,194
      Likes
      34
      No idea, how would I know that? I have a database, I know that much. Database name is djadamash

    4. #4
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      The database has to be controlled by something, probably a program called oracle. You can take the script and put it into a file. Make the extension on the end be .sql, then SQL will run the entire thing at once. If your DBMS isn't some derivation of SQL then you'll have to convert the code into something else.

    5. #5
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      I highly doubt it's an Oracle DB
      much more likely to be MySQL

      Adam.
      Ask your guy to show you how to access the database
      (chances are it's accessed through a web-application called phpMyAdmin)
      If you're going to be adding features to your site, you need to know how to change and update your database
      (\_ _/)
      (='.'=)
      (")_(")

    6. #6
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Quote Originally Posted by Ynot View Post
      If you're going to be adding features to your site, you need to know how to change and update your database
      Agreed, do you understand the code that you've posted? Specifically the CREATE, PRIMARY KEY, and TYPE?

    7. #7
      !DIREKTOR! Adam's Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Aquanina's closet
      Posts
      5,194
      Likes
      34
      Right,

      The guy said he ran a script to add this table to the database so gotta try adding the rest of the instructions tonight

    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
    •