Is there a way i can map two tables and show data. (Report)

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Is there a way i can map two tables and show data. (Report)

Post by udayvatturi » 2014-07-08 07:26

Suppose i have two tables A and B.

Can I create a View which shows some rows of A and some from B (based on the query , i will write query ). No need of editing,adding, or deleting.

In short can we create something like a report.
Thanks
Uday V
uday@spgon.com
http://www.spgon.com

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: Is there a way i can map two tables and show data. (Repo

Post by KSan » 2014-07-08 13:53

Yes. There is a way. It's a little trick.

1. Create a dummy table in AppGini With matching field types and names to what will come from table A and B.
2. Upload your app and let AppGini create this table for you on your db.
3. Enter and delete some record in this table to verify your frontend PHP is all ok.
4. Now drop that table from your db using phpMYAdmin.
5. Using phpMYAdmin create a view on your db with the same name as the table you created in step 1 and 2. This table must have matching field names and types. The view will have the SQL to bring data from tables A and B.
6. Run your application to observe your AppGini PHP can still talk to the view created in step 5.

User avatar
a.gneady
Site Admin
Posts: 1024
Joined: 2012-09-27 14:46
Contact:

Re: Is there a way i can map two tables and show data. (Repo

Post by a.gneady » 2014-07-10 10:15

Nice trick, Kerem ... thanks for sharing it. I plan to add support for views in future releases.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

:arrow: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.

:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.

:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: Is there a way i can map two tables and show data. (Repo

Post by KSan » 2014-07-10 14:13

Great! Support for views would help with many needs. Thanks for considering this.

udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Re: Is there a way i can map two tables and show data. (Repo

Post by udayvatturi » 2014-07-21 09:08

Thank You Kerem. This would be very helpful to me.
Thanks
Uday V
uday@spgon.com
http://www.spgon.com

grimblefritz
Veteran Member
Posts: 318
Joined: 2015-12-23 16:52

Re: Is there a way i can map two tables and show data. (Report)

Post by grimblefritz » 2016-01-02 16:11

Sorry to bump an old thread, but a hearty YES to views. Especially if they include calculated columns.

User avatar
D Oliveira
Veteran Member
Posts: 84
Joined: 2018-03-04 09:30

Re: Is there a way i can map two tables and show data. (Report)

Post by D Oliveira » 2018-03-20 18:49

this trick works for mass deletion as well? when u delet stuff from table A does it get removed from the view?

Post Reply