Hi,
Is there a simple way to create a view within Appgini?
Wat I do now is:
- within Mysql I create a view
- save the MySql code in notepad
- delete the view
Now I have to make that view known in the application.
- create in the application a new table —-> becomes a physic table in Mysql database with the wanted View name
- generate a project.
All the wanted “view” files where created
After login to the the project in a browser you see the table, where I like to see and use the view.
- So I delete the table in Mysql and create the wanted view with the right name. ( view name = generated table name)
When I try to execute the view nothing happens, in the Admin area I see MySql defenition Errors.
I try to have it fixed, no result.
So… I have view, within the project show as a table but I cann’t use this because off unfixable errors.
There must be a much easyer way to handle views.
Ron
Creating and using a View
Re: Creating and using a View
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Creating and using a View
Hi pbottcher,
And again, you helped me out, thank you!
Beneath I state what I did, maybe useful for others, so one don't have to go years back.
(by the way: a search action within the forum(s) sucks, it gives: to busy )
My steps:
Create a table of which you want a view of within AppGini
Save project and generate
Go to MySql environment
Create the desired view, with a different name than the table name (table- and view names should be unique)
After this a view has been created however with a not desired name
Stay in MySql environment
Delete the, by AppGini, generated table of which you like to have the view of
Change the name of the view to the former table name, you still are in the Mysql environment
The most simple way of doing this is:
(still within MySql)
After this you should be able to work with the view
Don't forget to the delete the not wanted view!
Goodluck
Ron
And again, you helped me out, thank you!
Beneath I state what I did, maybe useful for others, so one don't have to go years back.
(by the way: a search action within the forum(s) sucks, it gives: to busy )
My steps:
Create a table of which you want a view of within AppGini
Save project and generate
Go to MySql environment
Create the desired view, with a different name than the table name (table- and view names should be unique)
Code: Select all
Create view `view name` AS Select * from `<table name>`
Stay in MySql environment
Delete the, by AppGini, generated table of which you like to have the view of
Code: Select all
Delete `<table name>`
The most simple way of doing this is:
(still within MySql)
Code: Select all
Rename table `old view` to `new name`[code]
Don't forget to the delete the not wanted view!
Goodluck
Ron