|
From: | Eric Seigne |
Subject: | [Dolibarr-dev] Question about files uploaded for expensereport |
Date: | Fri, 26 Jul 2019 09:50:53 +0200 |
Hello dev, i was looking for a SQL request to get all files connected to a expense report ... something like that (for example if my expense report is id=2) SELECT * FROM `llx_ecm_files` WHERE `src_object_id` = 2 and src_object_type='expensereport' This request send me some informations but not all of them as i expected ... some of files are not in the result, so i switch to debug log level and here is the sql request that main dolibarr code make: SELECT rowid, label, entity, filename, filepath, fullpath_orig, keywords, cover, gen_or_uploaded, extraparams, date_c, date_m, fk_user_c, fk_user_m, acl, position, share FROM llx_ecm_files WHERE filepath = 'expensereport/(PROV2)' AND entity = 1 damned, do i have to make the same ? or is there something else ? After some investigations here is what i have now in my database
(my PROV2 is now "validated" ans his name is "ER1907-0002"):
database filepath stay refers to PROV2 ... i'm in trouble :-/ MariaDB [dolibarr]> SELECT filename, filepath FROM llx_ecm_files WHERE filepath = 'expensereport/(PROV2)' AND entity = 1 ;+------------------------------------------------+-----------------------+ | filename | filepath | +------------------------------------------------+-----------------------+ | (PROV2)-20190106-tickets_autoroute_janvier.jpg | expensereport/(PROV2) | | (PROV2).pdf | expensereport/(PROV2) | +------------------------------------------------+-----------------------+
Éric -- Éric Seigne | CAP-REL* address@hidden | +33 (0)6 987 444 01 https://cap-rel.fr | *Réseau Expertise Linux |
[Prev in Thread] | Current Thread | [Next in Thread] |