Multiple images in DB

Discuss MySQL Ajax Table Editor Paid Version

Multiple images in DB

Postby Porra » Thu Aug 11, 2011 8:47 am

Hi i have purchased the paid version and i'm working on a prokect that requires me to upload and display 4 images which is linked to the same record in the table.

say for instance the record is of a person, and i need a pic of the face, front, back and other. These images need to be uploaded to the database and then displayed again as well.

Can anyone assist me with this ?

Regards
José
Porra
 
Posts: 1
Joined: Thu Aug 11, 2011 8:41 am

Re: Multiple images in DB

Postby admin » Wed Sep 07, 2011 2:40 pm

Are you storing the images in the database? If so why don't you just make 4 blob columns in your table to hold the images?
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: Multiple images in DB

Postby iAlexis » Thu Oct 06, 2011 7:46 pm

Hi,

I was trying to do the script for multiple file upload with the possibilty of deleting them when i want t,o but i couldn't finish that.
I`m using mate (paid version) and i was wondering if someone in here did this and maybe you could help me, please ...

Thx.
iAlexis
 
Posts: 1
Joined: Thu Oct 06, 2011 7:38 pm

Re: Multiple images in DB

Postby MikeW » Thu Nov 10, 2011 8:09 pm

I'm looking also for a solution to upload multiple images to DB.
The data is stored in the database, but I can see always only the first image.

What must be changed at DisplayFileFromDb.php file ?
Thanks for help,
Mike

OK, solved: very easy:
copy DisplayFileFromDb.php -> DisplayFileFromDb2.php and change the names inside
MikeW
 
Posts: 27
Joined: Mon Oct 31, 2011 11:43 am

Re: Multiple images in DB

Postby MikeW » Tue Aug 28, 2012 7:07 pm

But, if I update only ONE file, the second file will be delete,
because the input field for file upload is empty.
I there a solution to store the second filenname, which I will not change?

Code: Select all
$tableColumns['file_data'] = array('display_text' => 'Logo', 'perms' => 'EVAXTQSHO', 'file_upload' => array('type' => 'file_type', 'name' => 'file_name', 'max_size' => 500000),  'display_mask' => 'file_name', 'table_fun' => array(&$this,'formatImage'), 'view_fun' => array(&$this,'formatImage'));
MikeW
 
Posts: 27
Joined: Mon Oct 31, 2011 11:43 am

Re: Multiple images in DB

Postby admin » Wed Sep 12, 2012 4:49 pm

In the handleFileUpload function in the AjaxTableEditor.php file change
Code: Select all
if(isset($colInfo['file_upload']) && isset($_FILES[$col]))

to
Code: Select all
if(isset($colInfo['file_upload']) && isset($_FILES[$col]) && strlen($_FILES[$col]['name']) > 0)
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: Multiple images in DB

Postby asimo101 » Fri Mar 27, 2015 6:06 am

admin wrote:In the handleFileUpload function in the AjaxTableEditor.php file change
Code: Select all
if(isset($colInfo['file_upload']) && isset($_FILES[$col]))

to
Code: Select all
if(isset($colInfo['file_upload']) && isset($_FILES[$col]) && strlen($_FILES[$col]['name']) > 0)


No such function in the file anymore, I am guessing code has changed in an upgrade. What do I do to ensure that on updating one image the remaining do not get deleted? I too used the multiple DisplayFileFromDB.php trick.

Edit: And I am using UploadToDb.
asimo101
 
Posts: 1
Joined: Fri Mar 27, 2015 6:02 am


Return to Paid Version

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron