Results 1 to 6 of 6

Thread: Setting up a file database

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default Setting up a file database

    I want to set up a table or database or something so I can use the
    Code:
    $id = $_GET["id"];
    And then have the file opened up in a new window... or something like that

    I really don't know how to explain it... but if you see any links like this:
    HTML Code:
    http://www.sitename.com/items.php?id=12
    I wanna get it so that I can do something like that using a mysql database but I don't know how to set up a mysql table very well... I have search google for this and have had absolutely no luck at all...

    This is different from the question I asked in the PHP form about IDs I want to set up a table so I can do something like that...


    Thanks if you got any questions let me know... so I could explain further...

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    CREATE TABLE table_name ( name type, name type, name type, ... );
    Last edited by Twey; 09-22-2007 at 11:54 PM. Reason: Whoops... *minor* edit...
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Do something like this, I am not really good with mysql so correct me if im wrong!
    Code:
    CREATE TABLE urls (
      id TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
      url TEXT NOT NULL,
    )
    its something like that, i have not masterd this so i do not know.

    then use ..
    Code:
    $id = $_GET["id"];
    I think this is how it works..
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #4
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    k thanks... guys i'll try both of them out...

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by Rockonmetal View Post
    k thanks... guys i'll try both of them out...
    You would want to try out insanemonkey's if you are a copy/paste kind of person. Mostly because Twey's example just shows what you should do syntax wise. insanemonkey's shows what a "finished" sql query would look like.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Ok... now how do I add stuff so that when I type in http://www.pureadd.com/files.php?id=12
    that i load the file???

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
  •