Forums

Problem db read Details List

gmarra7 04 Apr, 2019
I created a view to read the details of a specific "item". The primary key used is obviously "aid", but when I click on the link that takes me to the detail view of the item, the read action db "read_sinistro" always remains me only the item associated with the primary key 1 despite the link points to https://scuole.unimega.it/denunce?conn=lista_sinistri_admin&sinistro_aid=2&event=view. The strangest thing is that so far it worked.


healyhatman 04 Apr, 2019
"Always remains me only" Going to need a translation sorry
gmarra7 05 Apr, 2019
Example when I click on the item that has aid=2 as its primary key,
it always returns the values associated with the item with primary key 1.
This is the problem. Thanks.
healyhatman 05 Apr, 2019
OK so what does your read data action look like for this view event?
gmarra7 05 Apr, 2019
The situation is this. I can tell you that this setting worked for a period of time.





healyhatman 05 Apr, 2019
You haven't put a where condition in there buddy. You haven't TOLD IT to get the specified id.
gmarra7 05 Apr, 2019
I set my condition in the link sinistro_aid={var:sinistri_list.row.Sinistro.aid}
that refers to the item's aid.

Example when I clicked on https://scuole.unimega.it/denunce?conn=lista_sinistri_admin&sinistro_aid=1&event=view
returned all the values associated with aid = 1

Example when I clicked on https://scuole.unimega.it/denunce?conn=lista_sinistri_admin&sinistro_aid=2&event=view
returned all the values associated with aid = 2


But this no longer works.
healyhatman 05 Apr, 2019
In your read data action that you posted, you don't actually have the WHERE CONDITION set. So the data is in your url under {data:sinistro_aid} but you haven't told your read data action to USE that value to get a specific result.
gmarra7 05 Apr, 2019
Thank you.
Now works.
It tricked me into the fact that strangely it worked before without inserting any conditions in db read.
This topic is locked and no more replies can be posted.