Old 15-04-2007, 16:34   #1 (permalink)
HRK
Registered User
 
Join Date: Apr 2007
Posts: 7
Want to create a basic database.

Hi, first post!
I need some help, hoping someone knows more about this than me.

I need a database that stores content submitted by visitors (videos, games, etc.). Each section (video, game, etc.) will be further broken down into genres (funny, serious, musical, etc.), and in each section, the most recent 10 submissions for each genre will be displayed.

In addition, I'd also like there to be a way for visitors to view all "funny" content, across every section (funny videos, cartoons, etc. all displayed on the same page), as well as newest content submitted in all sections.

A perfect example of this is Newgrounds.com - there's tons of media there, and every submission can be called up many different queries.

Any ideas?

Thanks,
Aaron
  Reply With Quote
Old 15-04-2007, 17:02   #2 (permalink)
Cborrow
I like code.
 
Join Date: Dec 2004
Location: Chesapeake, VA
Posts: 226
Send a message via AIM to Cborrow
You will probably want a database that has all the basics like the title of what is being uploaded, the description and such but also a parent_id and a sub_id.

The parent_id would be something like the id of the type of page so like games, videos, images and the sub_id would be the genre in the page so funny, weird and so on. So you could call the sub_id to get the top 10 funny things from all the categories.
  Reply With Quote
Old 15-04-2007, 17:21   #3 (permalink)
HRK
Registered User
 
Join Date: Apr 2007
Posts: 7
That makes sense, thanks alot. I also have to figure out how to format the results to appear in a certain way, but this will definitely get me started.

Would I be able to use a cgi script for a submission form, then use the MySQL for the database?
  Reply With Quote
Old 15-04-2007, 18:15   #4 (permalink)
Cborrow
I like code.
 
Join Date: Dec 2004
Location: Chesapeake, VA
Posts: 226
Send a message via AIM to Cborrow
Yes, you can use a CGI script and form to submit content and MySQL or other databases as your database.
  Reply With Quote
Old 15-04-2007, 22:42   #5 (permalink)
HRK
Registered User
 
Join Date: Apr 2007
Posts: 7
Thanks, and finally, can I use Perl scripts to take the information from the MySQL database and display it on the site?

Is that the most common/best way to do it?

I'm just trying to get an idea of what subjects I should be learning.
Thanks again,

Aaron
  Reply With Quote
Old 15-04-2007, 22:59   #6 (permalink)
Cborrow
I like code.
 
Join Date: Dec 2004
Location: Chesapeake, VA
Posts: 226
Send a message via AIM to Cborrow
Perl, PHP or a number of other languages. You may find that more hosts support PHP though.

Perl and MySQL - PerlWiz: Using Perl with MySQL
PHP and MySQL - MySQL AB :: Building a Database-Driven Web Site Using PHP and MySQL
  Reply With Quote
Old 15-04-2007, 23:13   #7 (permalink)
HRK
Registered User
 
Join Date: Apr 2007
Posts: 7
Great, thanks alot for the help. My host supports PHP, and I'm already somewhat familiar with it, so I'll start with that and see how it goes. That second link you posted looks great, thanks alot!

Aaron
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8