Frage

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

War es hilfreich?

Lösung

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!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top