![]() |
|
#1
|
|||
|
|||
Transfer longblob from one table to another tableGreetings,
I am using one table as an upload area for pictures, to be reviewed later prior to them being placed online for public viewing. I am keeping the upload table seperate from the main table. I am able to transfer everything over, but the longblob. Is there anything special that needs to be done, to transfer images fromone table to another table?? Thanks, Richard |
|||
|
#2
|
||||
|
||||
Re: Transfer longblob from one table to another tableI have never stored images in the database, so I can't think of anything that might prevent one from 'moving' such data around.
I usually store the images in the filesystem, but I keep record of the filename in the database. So if I want to show image ID No.23, I just fetch the row, get the filename and read the file to do what I want with it. Maybe the fault is in your 'transfer image' script? In other words, show us what you used (script) to transfer the image. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
||||
|
||||
Re: Transfer longblob from one table to another tableSame here, Richard. We also store only the filename in our DB(s), and all the files are in a specific directory. (The path is set in a define statement for use within the program)
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#4
|
|||
|
|||
Re: Transfer longblob from one table to another tableThe only reason I went with placing the image into the database, was some information that I had recieved on the internet. Now, if what I am doing is not the smart thing, then I can easily go the other direction and place the images into a seperate directory.
Richard |
|
#5
|
|||
|
|||
Re: Transfer longblob from one table to another tableI currently have a submital page for a visitor to my site to input all the information, and then include an image to upload to the site. That inputed image was placed into the database, in the same row as the rest of the information, related to the image. I use a form for the input of the information.
PHP Code:
1.) How can I change this to allow for saving the file into a directory on the site. 2.) Another reason I had placed the file in the database, is that sometimes the images have the same name. (webcam, default, pic, etc...), thus I don't have to worry about the name conflicting in the database. I'll take any suggestions, or help. Thanks, Richard |
|
#6
|
|||
|
|||
Re: Transfer longblob from one table to another tableI decided from reading the previous two replies, and decided to adjust my script to allow for the filename to be saved in a seperate directory on the website. The only thing I need know,, is how to create randomized names, thus preventing accidental same name collisions.
|
|
#7
|
||||
|
||||
Re: Transfer longblob from one table to another tableThe point is that you want to avoid overwriting image files. How you do this is entirely up to you.
The obvious thing to do is to:
You can login to GIDNetwork and there is an option for you to upload images. Try uploading a couple and try to use the same name for each. Maybe I didn't check for duplicate names (now that you mentioned it) __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need-Space.co.uk | Reseller and Shared Hosting Plans! | nsuk | Web Hosting Advertisements & Offers | 0 | 28-Jul-2006 08:01 |
| Need-Space.co.uk | Reseller and Shared Hosting Plans! | nsuk | Web Hosting Advertisements & Offers | 0 | 19-Jul-2006 09:31 |
| Need-Space | Reseller and Shared Hosting Plans! | nsuk | Web Hosting Advertisements & Offers | 0 | 23-Jun-2006 11:07 |
| Need-Space | Reseller and Shared Hosting Plans! | nsuk | Web Hosting Advertisements & Offers | 0 | 06-Jun-2006 14:43 |
| Cannot create a table in DB | WaltP | MySQL / PHP Forum | 3 | 26-Apr-2006 17:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The