PDA

View Full Version : Upgrade Plugin Code


TheInsaneManiac
07-06-2009, 01:07 AM
I have a question. People who download my products have to uninstall them in order to update. How can I get it to work without them uninstalling?

<code version="2.1">
<installcode><![CDATA[$db->query("INSERT INTO " . TABLE_PREFIX . "datastore (title,data) VALUES ('rapidsharethanks','')");]]></installcode>
<uninstallcode><![CDATA[$db->query("DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'rapidsharethanks'");]]></uninstallcode>
</code>

Dismounted
07-06-2009, 05:22 AM
What are you doing to create the need to uninstall first? That is, why is an uninstalled needed?

TheInsaneManiac
07-06-2009, 06:53 AM
What are you doing to create the need to uninstall first? That is, why is an uninstalled needed?

Yea I just realized that lol. I realized that the install was for one of my other modifications that install a table into the database... So yea I don't need the code as it's only used for installing data correct? So if I just have php code, templates, ect, I shouldn't need it right? Only if I plan on calling stuff from the database.

Dismounted
07-06-2009, 09:27 AM
Don't really understand what you're trying to say... You said:
People who download my products have to uninstall them in order to update.
What happens that needs them to uninstall first? Any updates can be installed over the top of existing installations. Install code is only run once, just make sure the version numbers you have assigned are correct.