PHP + MySQL CMS system for files

gamerdude

New Member
Messages
101
Reaction score
0
Points
0
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:

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
I would suggest that you can have separate tables for each. that would be easy to retrive all the datas.
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
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
 

gamerdude

New Member
Messages
101
Reaction score
0
Points
0
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:
Top