I have been working on a pretty large database this last week. Basically I am taking an Access database and converting it to a MySQL database. I have seccessfully converted all the tables and views to MySQL. However I have a view that requires input from the user, the date. The other view is the view that will be call.
view 1 – compiled_fourweeks – needs date
view 2 – metrics_fourweeks – uses `compiled_fourweeks in query.
I was thinking of a precedure but I won’t be able to reference the columns in the query.
I am kind of running out of ideas at this point.
If I understand correctly, you need to execute a view (
metrics_fourweeks) that needs data from another view (compiled_fourweeks), and this last view requires input from the user.I would go with the procedure approach:
If your database will be used just by a single user, your problem is solved. But if your database is meant to be used by more than one user… well, you can use temporary tables:
Hope this helps you.