Mod-creation: alter mySQL

Started by –Michael, May 13, 2005, 11:35:06 AM

Previous topic - Next topic

–Michael

Hi,

I know - more or less - how to create a mod, so stuff like <search for>, <add after>.
But I would like to implement the altering of mySQL tables, so something like
mysql_query("ALTER TABLE {$db_prefix}boards .....

The same thing I would like to implement for the uninstallation routine of a mod.

Is there any possibility to do this? It should include some messages / echos so that the user can see if the altering of the tables was successful or not.
So far, I only have a separate *.php file which needs to be executed to do the mySQL altering. This is what I'd like to avoid.

Thanks in advance for any hint,
Michael
My SMF Mod: Static Page Mod

[Unknown]


–Michael

Great, thanks [Unknown], I will have a look at it now.

Michael
My SMF Mod: Static Page Mod

–Michael

OK, I've found it, thanks again.

Just a short conclusion for all the others who may come across this thread. In package-info.xml you can call a php file, e.g.
<install>
<readme>readme.txt</readme>
<modification>install.xml</modification>
<code>add_settings.php</code>
</install>


Michael
My SMF Mod: Static Page Mod

Advertisement: