Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 12-05-2008, 12:50 PM   #1 (permalink)
ax3
Cool as a CUCUMBAR ! ! !
 
ax3's Avatar
 
Join Date: Dec 2003
Posts: 5,052
Default Database 2 create record ! ! !


any database which will record all files stored in 1 folder & display a list in\on a webpage ?
__________________
... W H O T ...
ax3 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 12-05-2008, 06:48 PM   #2 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: Database 2 create record ! ! !

I don't know which language you need it in, but here is how I would do it using PHP and MySQL:

With PHP and MySQL:

PHP Code:
<?php
$file_list
=scandir($dirname);//returns an array containing names of all file and folders.
foreach($file_list as $file)
{
$sql="";//your SQL command
mysql_query($sql);
}
?>
The target folder may contain more folders too. If you want to exclude those folder names from being added to the database, use the is_file() function. It returns false of it is a folder. So put a conditional statement that will insert the file name only if is_file() function returns true.

Doing it without MySQL:
PHP Code:
<?php
$file_list
=scandir($dirname);
foreach(
$file_list as $file)
{
echo 
"<li>".$file."<li>";
}
?>
Note: scandir() function is available from PHP 5. PHP 4 does not have such a function.
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता
victor_rambo is offline  
Old 13-05-2008, 04:48 PM   #3 (permalink)
ax3
Cool as a CUCUMBAR ! ! !
 
ax3's Avatar
 
Join Date: Dec 2003
Posts: 5,052
Default Re: Database 2 create record ! ! !

@rohan_shenoy ...... thanx 4 reply .... bt am a noob in programming .......

any softy which would do it easly 4 me ?
__________________
... W H O T ...
ax3 is offline  
Old 13-05-2008, 04:58 PM   #4 (permalink)
Legen-wait for it-dary!
 
dheeraj_kumar's Avatar
 
Join Date: Dec 2004
Location: Chennai
Posts: 2,471
Default Re: Database 2 create record ! ! !

Well, you can always use DIR to pipeline results onto a text file, and then you can import it to excel... Is this what you are asking?
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
dheeraj_kumar is offline  
Old 13-05-2008, 06:40 PM   #5 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: Database 2 *reate re*ord ! ! !

Don't know if there is any program!
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता
victor_rambo is offline  
Old 14-05-2008, 04:58 PM   #6 (permalink)
ax3
Cool as a CUCUMBAR ! ! !
 
ax3's Avatar
 
Join Date: Dec 2003
Posts: 5,052
Default Re: Database 2 create record ! ! !

& how r v gonna import those links from excel file 2 my webpage ?

softy = any freeware like php 1`s .... i dont know how they work bt knew sql long back where i could get all files listed in folders ......
__________________
... W H O T ...
ax3 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
web database help.... mck3bangalore Programming 9 06-04-2008 06:28 PM
How to connect with database? debiprasad_sahoo QnA (read only) 2 25-09-2006 04:52 PM
Record-Anything v2.8 rajat22 QnA (read only) 2 10-11-2005 08:46 AM
how to record ? shreyadr QnA (read only) 9 05-05-2005 10:48 AM

 
Latest Threads
- by Sujeet
- by clmlbx
- by Sujeet
- by icebags

Advertisement




All times are GMT +5.5. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2