Page 1 of 1

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

Posted: 2014-07-08 07:26
by udayvatturi
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.

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

Posted: 2014-07-08 13:53
by KSan
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.

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

Posted: 2014-07-10 10:15
by a.gneady
Nice trick, Kerem ... thanks for sharing it. I plan to add support for views in future releases.

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

Posted: 2014-07-10 14:13
by KSan
Great! Support for views would help with many needs. Thanks for considering this.

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

Posted: 2014-07-21 09:08
by udayvatturi
Thank You Kerem. This would be very helpful to me.

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

Posted: 2016-01-02 16:11
by grimblefritz
Sorry to bump an old thread, but a hearty YES to views. Especially if they include calculated columns.

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

Posted: 2018-03-20 18:49
by D Oliveira
this trick works for mass deletion as well? when u delet stuff from table A does it get removed from the view?