LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   perl script to insert image information (https://www.linuxquestions.org/questions/programming-9/perl-script-to-insert-image-information-49132/)

rhuser 03-10-2003 01:21 PM

perl script to insert image information
 
Hi Experts here

I would like someone to help me get or write a script that does the following:

1. take incoming images information from a direcotry and insert in to MySQL. image information (image_name, image_size and image_date)

2. make some kind of reference to where the image is. so when a query on the net is done the image information and image can be displayed.

Please help me.

Cheers, Mel

j-ray 03-12-2003 05:23 AM

i do not really understand what u intend to do.

u have a directory where images are stored. but regularly new images come in. where do they come from? what way they are written to the directory?

u can use readdir function to read the names of the images into an array save the contents of the array to a text file everytime u run the script.

so when u start the script u compare the current array with the former array in the text file and write the img info to the mysql for all array elements that are not in the former array. so u avoid double entries.

then update the text file with the new array content.

your scnd question i dont understand at all.

hope this is sort of helpful
cheers, jens


All times are GMT -5. The time now is 06:54 AM.