enter sql and php code

nitro282

New Member
Sorry I'm neophyte on fabrik.
I add a new list with reference to an existing table. I discovered that the attached field only displays the file name and not the link, so I find out from the old script that the directory was created through a logical function with linking fields. So I created a join between tables in the list, then to make the link to attachments appear, I created this code that I don't understand where I can insert it.

SELECT *, CONCAT('img/atti',a.ctrl,' / ', b.doc_semplice) AS pathPDF FROM `tipi_atti` a, atti b WHERE a.idtipoatto = b.idtipo_atto AND idatto = 25718;
 
You could probably use a calc element to build the link, using that query, and returning a full 'a' tag.

-- hugh
 
so I can't understand, I would like to understand where I have to intervene exactly in order to enter the code. could you give me an example?
 
Hi nitro,

Hugh was talking about the "calc" element ( http://fabrikar.com/forums/index.php?wiki/calculation-element/ ). You have all of the necessary example you need, just be patient reading it.

Additional Reading:
1) Placeholders - http://fabrikar.com/forums/index.php?wiki/placeholders/
2) Content Plugin - http://fabrikar.com/forums/index.php?wiki/content-plugin/
3) PHP common tasks - http://fabrikar.com/forums/index.php?wiki/php-common-tasks/

Tip: (Might come in handy in the future if you encounter problems)
1) Test all the possible settings
2) Update using the latest github (if it persist)
3) Browse the Fabrik Forum diligently (if still it persist)
4) Browse the Github of Fabrik diligently also (if still 2x it persist)
5) Create a Fabrik thread on your problem. (if still 3x it persist)
6) Ask nicely and do not spam bump.
7) Observe proper decorum always.
8) Read, familiarize and practice. :)
 
Good evening, I'm looking for an experienced Fabrik professional to solve this problem and other problems for new projects.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top