Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.


edited May 2006 in Vanilla 1.0 Help
So i completely boned installing v1. It seems that i'd got a part of the way through installing a 0.xx version and then not bothered completing it. So this means it wasn't properly installed and the installer / upgrader in v1 treats it as an upgrade... but this doesn't work, throws a bunch of errors. I don't have admin or control panel access to this database, i also cannot delete the database because its got other stuff that needs to stay... nor can i create a new one. Anyone know a way i can remove all traces of vanilla from this db and start again? Sorry for my retardedness, i'm a designer :p Knowwhatimsayin?


  • lechlech Chicagoland
    Have you got shell access to the machine in question? Feel like taking a command-line based adventure into the unknown? Or at the very least, installing some tools you may end up using on a regular basis. If the answer is yes to any of these, you can start by hitting up the mysql site and learning how to manually modify/add/remove databases/tables or you might feel it necessary to slap phpmyadmin or a similar tool onto your site to manage databases you have access to. Off-hand though, I can't for the life of me remember the syntax for dropping tables as I've been doing other things. If someone could be so kind as to helping benney here, that would be great :D
  • MarkMark Vanilla Staff
    Hmmm. I'd probably write a script that calls show tables on the database in question and then loops through the results, dropping any tables that are prefixed with LUM_
  • i'm not sure if ive got the access to install phpmyadmin... and its a site that wont have much upkeep once installed. Mark your suggestion sounds like what needs to be done! Anyone got the time to knock this up for me :)? I can trade any design / flash / IA time for any little jobs you might need done... Ta M
  • MarkMark Vanilla Staff
    <?php $DBHost = 'localhost'; $DBUser = 'your_database_user'; $DBPass = 'your_database_password'; $DBName = 'your_database_name'; $Connection = mysql_connect($DBHost, $DBUser, $DBPass); if (!$Connection) { echo 'Failed to connect to the database.'; die(); } else { if (!mysql_select_db($DBName, $Connection)) { echo 'Failed to connect to the '.$DBName.' database.'; die(); } else { // If the database connection worked, get the tables in the db $TableData = mysql_query('show tables', $Connection); if (!$TableData) { echo 'Failed to retrieve tables from database.'; die(); } else { while ($Row = mysql_fetch_array($TableData)) { $TableName = $Row[0]; if (strpos($TableName, 'LUM_') === false) { // Do nothing, LUM_ was not found } else { if (!mysql_query('drop table '.$TableName, $Connection)) { echo 'Failed to drop table '.$TableName; die(); } } } } } } ?>

    That's it. I haven't tested it or anything, use at your own risk. I recommend backing up your db before you use this.
  • That looks good to me :) if (strpos($TableName, 'LUM_') === false) { whats with the triple equals? Is that a PHP thing? Im a pure actionscript boy =)
  • Triple equals tests without implicit format conversions.
  • Fantastic. It worked like a charm. Thankyou Mark... let me know if theres anything I can help you with. Sorry community for taking up valuable coding time :)
This discussion has been closed.