Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Do I use a database for this?
Old 01-12-2008, 07:16 PM Do I use a database for this?
Junior Talker

Posts: 2
Name: nick
Trades: 0
Hi, I have a couple OScommerce sites so I am by no means a webmaster

However I am looking into expanding into a downloadable library for my customers, Theres about 2500 files though! Obviously It would take MONTHS to make individual HTML links to them and create a page like that, there must be a easy way, I do not know much at ALL about databases so I assume this is what people use for this task? My Host does have MYSQL...

Let me give you an example of a page that might give you an understanding of what I need. On this guys page you can see he has a nice list of games or whatever, I want the same type setup only for my ebook manuals, I doubt he sat there and typed all those in individually right? Heres the page example http://doperoms.com/roms/32x.html

Thanks for your response and taking the time for a new guy.
mrserv0n is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-13-2008, 12:14 AM Re: Do I use a database for this?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I'd recommend using a database for this. Since you have this stuff already somewhere, you'll want to write a script to automatically insert that information into the database and then edit the information as needed.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 01-13-2008, 01:34 PM Re: Do I use a database for this?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I do not know much at ALL about databases so I assume this is what people use for this task
Yep, but the database is only ONE part of the process, you also need server side code to query the database and display the information in HTML code.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-13-2008, 04:42 PM Re: Do I use a database for this?
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
A simple scandir script would suffice. http://uk3.php.net/scandir

Something like below - will scan a specific directory and print out each file as a link.

PHP Code:
 <?php 
function listDirectory ($dir){
$list scandir($dir);
$i 0;
$num count($list);
while(
$i $num){
print 
"<a href=\"$dir/$list[$i]\">$list[$i]</a><br />";
$i++;
}
}

echo 
listDirectory("images");// substitute images for the directory to list
?>
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 01-13-2008, 05:04 PM Re: Do I use a database for this?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
maxximus's code is for PHP 5 only, so if you're working on PHP 4...well, upgrade to PHP 5!
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 01-13-2008, 10:04 PM Re: Do I use a database for this?
Junior Talker

Posts: 2
Name: nick
Trades: 0
maxximus, thanks a ton, that is awesome! when I get a moment I will play with it and let you know

Last edited by mrserv0n; 01-13-2008 at 10:09 PM..
mrserv0n is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Do I use a database for this?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42458 seconds with 12 queries