문제

I am developing a joomla component. I need to import a sql view in my project.

create view view_name as select * from my_table

도움이 되었습니까?

해결책

How you tried in your xml file add something like

<install>
        <sql>
            <file charset="utf8" driver="mysql">install.sql</file>
        </sql>
    </install>
<uninstall>
        <sql>
            <file charset="utf8" driver="mysql">uninstall.sql</file>
        </sql>
    </uninstall>

And the install.sql file should have the query. Also make sure the DB user have permission to add new tables.

Its Done!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top