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.
Is there a way i can map two tables and show data. (Report)
-
- 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
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.
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
Nice trick, Kerem ... thanks for sharing it. I plan to add support for views in future releases.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Is there a way i can map two tables and show data. (Repo
Great! Support for views would help with many needs. Thanks for considering this.
-
- 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
Thank You Kerem. This would be very helpful to me.
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: Is there a way i can map two tables and show data. (Report)
Sorry to bump an old thread, but a hearty YES to views. Especially if they include calculated columns.
- D Oliveira
- AppGini Super Hero
- Posts: 348
- Joined: 2018-03-04 09:30
- Location: David
Re: Is there a way i can map two tables and show data. (Report)
this trick works for mass deletion as well? when u delet stuff from table A does it get removed from the view?