6

I want to create a MySQL View in hook_schema() for a module I am developing.

Does anyone know how to do that?

3

I already know how to resolve this issue.

In the .install file instead of trying to create a View in the hook_schema in hook_install you can just use de db_query and create the view. Don't forget in the hook_uninstall to drop the created View.

With my researches i found that is impossible to create a view directly in hook_schema like you do in a table, but if someone knows how to that please share.

Hope this help someone out there.

EDIT: Thanks for the correction kiamlaluno

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.