+ Reply to Thread
Results 1 to 5 of 5

Thread: PHP + MySQL CMS system for files

  1. #1
    gamerdude is offline x10 Sophmore gamerdude is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    101

    MySQL Table Layout

    I'm working on a CMS for files, to be exact, game mods (similar to expansions). I could not find a CMS just or files that I could easily tailor to meet my own needs so I decided to make one. I need to be able to store the names of the files, the authors, the dates released, dates updated, version numbers, descriptions, links to multiple files, links to mirror sites, and image links. The problem is that The number of images and files can vary from 1 or none to 20. I was planning on having several columns but I was thinking, would it be more efficient and easier to have separate tables for all of the files?

    Basically, I need to know how to layout my database. Also, if you suggest I have separate tables, how do I list tables with the mysql_query() function? And how would I go about selecting them? Listing them? I think it is much easier to have several columns and just have a image and file limit of 20 or something. Opinions please.
    Edit:
    Is there no one that has an opinion about this?:dunno:
    Last edited by gamerdude; 05-26-2008 at 08:29 PM. Reason: Automerged Doublepost

  2. #2
    sunils's Avatar
    sunils is offline x10 Spammer sunils is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Chennai ,India
    Posts
    2,264

    Re: PHP + MySQL CMS system for files

    I would suggest that you can have separate tables for each. that would be easy to retrive all the datas.
    [LEFT][B]Sunil Sankar
    -------------------------------------------------------------------------

  3. #3
    LHVWB's Avatar
    LHVWB is offline Lord Of The Keys LHVWB is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Australia
    Posts
    1,308

    Re: PHP + MySQL CMS system for files

    Okay, if you really want to use MySQL to create your own system then you should have a look over the MySQL php functions, there are actually a whole lot of them and there is often a function which will do what you want.

    In terms of listing databases you should use the mysql_list_tables() function.

    When you want to access information from the database you should use the mysql_query() function, you don't actually select a table, instead you specify the table that you are accessing when you pass sql to that function.

    Here is a tutorial with more about php and databases, which covers MySQL.
    http://hudzilla.org/phpwiki/index.php?title=Databases

  4. #4
    rubens is offline x10Hosting Member rubens is an unknown quantity at this point
    Join Date
    Dec 2005
    Posts
    46

    Re: PHP + MySQL CMS system for files

    Hi, have you look to this one:

    http://www.phparena.net/scripts.php?script=pafiledb

    I think that may be is what you need...

    Bye!!!

  5. #5
    gamerdude is offline x10 Sophmore gamerdude is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    101

    Re: PHP + MySQL CMS system for files

    Verbsite, thanks for the info although, I am pretty sure that the list tables function is deprecated. I also know how to arrange the data, I was just unsure if I should have tons of tables or just a lot of columns. I actually think I will go with the columns after looking at the layouts i came up with. The functions are overall easier to work with when applied to my site. If anyone wants to suggest otherwise though, please do so. Also, I thought you could use the mysql_query() function to list tables some way? Also, I do not need help with PHP, I know it rather well, I'm just unsure how to organize all of the data. Thanks for all the responses and help.

    EDIT: PHParena is not really what I am looking for, that is why I'm making my own system, thanks anyway though.
    Last edited by gamerdude; 05-27-2008 at 08:45 PM.

+ Reply to Thread

Similar Threads

  1. PHP / MySQL - Unescaping strings?
    By lambada in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 02-06-2008, 07:11 PM
  2. JSP o PHP, MySQL
    By orlando in forum Ayuda Web
    Replies: 4
    Last Post: 11-15-2007, 10:00 PM
  3. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers