[SOLVED] Â Multiple attachments from one field |
2/21/2020 2:43:46 PM |
PHPRunner General questions | |
![]() Hi Sergey, |
|
![]() |
abidcastaneda author 2/21/2020 |
I have also set the pdf field as a longblob to store the files in the database, but this only alows me to store 1 file per field, and I do have to store anywhere from 1 to 6 files in the same field, if not, I would have to set up 6 fileds to store files and most of the time I would upload 1 - 3 files and the rest of the fields would be blank, which, kind of confuses my users. |
W
|
WilliamBDevClub member 2/21/2020 |
Look at this. It may help you access the files. |
![]() |
abidcastaneda author 2/27/2020 |
Thanks, I have gone through the link that you posted, but apparently I don't know how to use it, I've added this on the after record updated event and on the javascript onload event: |
W
|
WilliamBDevClub member 2/27/2020 |
Thanks, I have gone through the link that you posted, but apparently I don't know how to use it, I've added this on the after record updated event and on the javascript onload event: $fileArray = my_json_decode($values["pdf"]); $values["pdfiles"] = my_json_encode($fileArray); But nothing happens. I've also added this on the after record updated event: $fileArray = my_json_decode($values["pdf"]); $data = array(); $keyvalues = array(); $data["pdfiles"] = $fileArray; $keyvalues["id"] = $values["id"]; DB::Update("facturas", $data, $keyvalues ); And nothing, my DB doesn't get updated with the file names. P.S. pdf = field where the files get uploaded (varchar2000) pdfiles = field where the file names are supposed to be
|
![]() |
abidcastaneda author 2/28/2020 |
Awesome, thanks, you where right, I was not looping through the values, here's the code I finally used: |
![]() |
abidcastaneda author 2/28/2020 |
BLAMO!!!! I SOLVED IT!!! |