data from parent table

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
Veteran Member
Posts: 48
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

data from parent table

Post by baudwalker » 2018-03-13 07:01

is it possible to get the actual data from the parent table instead of the ID

User avatar
Site Admin
Posts: 833
Joined: 2012-09-27 14:46

Re: data from parent table

Post by a.gneady » 2018-03-14 09:49

You'd need to do a join query .. something like this:

Code: Select all

$parent_value = sqlValue("select parent_caption_field from parent_table left join child_table on where'{$record_id}'")
Replace parent_caption_field, parent_table, child_table, lookup_field, id with actual names. $record_id is the variable containing the ID of the child record.
AppGini: Responsive, collaborative web db apps in minutes.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

Post Reply