Kattouf
November 22, 2019, 5:16pm
1
I had to update a page hit with +1 but i couldn’t figure out how to do it using the Update Query Ended up doing it in Custom Query.
This worked fine:
UPDATE Feed SET Feed.f_views = Feed.f_views + 1 WHERE Feed.feed_id = :P1
:P1 {{$_GET.topic}}
But bellow didn’t. I tried {{f.views+1}} , f.views+1 with () without. Nothing worked.
What’s the correct syntax for doing it here:
Teodor
November 22, 2019, 5:28pm
2
In your update action, add a single query which returns the current value. Turn the output option off for the query step.
Then in the update record step, for the value use the value returned by the query like: {{query1.field_name + 1}}
3 Likes
patrick
November 22, 2019, 5:45pm
3
Best is to use a custom query, the query builder doesn’t support references to columns. Other way is with an extra select query in a step before the update step and use the expression of Teodor.
2 Likes