The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
MySQL question
How can I make my queries that for instance add a table, or a column in an existing table, or drop a table or a column perform it regardless of whether the table or the column exist or not? This would be very useful for install/uninstall codes so that a product can be overwritten or uninstalled regardless if the installation was completed succesfully.
Will just a "@" before the function accomplish this? |
#2
|
||||
|
||||
If I get your meaning, then just use incremental install sections by product version number. You have the original installs code under install section with the original install version number. Leave that permanent. Then add changes and additions under new higher version numbers.
As long as the version number is higher than the users current version it will run it. You can check my Articlebot install for an example. |
#3
|
|||
|
|||
Yes but small bugfixes do not increase the version number and even if they do, the code will become very complicated after some editions. For the install code I want for instance, if a table/field exists to do nothing. If it doesn't exist to install it, but with an easy way. I don't have the time and courage to write hundreds of lines for just install/uninstall code.
|
#4
|
||||
|
||||
If everyone had mysql 5 you could probably do it easy. Unfortunately.....
I just increment the version number by 0.0.1 for bugfixes and consolidate older version installs as time goes by. Also. You should be putting your db codes between these vb functions. PHP Code:
|
#5
|
|||
|
|||
Hmmm I'll try that, thanks
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|