Need SQL help
airbornflght
Houston, TX Icrontian
Ok, so I messed up my joomla install by trying to install an SEO patch via file overwrites. I followed the directions exactly yet the backend still got all messed up. So I tried putting the files back and that didn't work. Anyway, long story short, I got smart and just replace the entire administrator folder, but only after trying to do a new install and pointing it at the old database.
So now my database has a set of tables with the prefix jos_ and a set with bak_. Now the bak_ ones are my old site and the jos_ ones are the 'new' content the installer made.
So how would I write an sql or php script to delete all of the jos_ tables and rename the bak_xxxx tables to jos_xxxx? I'm about to shoot myself. especially since I didn't backup.
this is semi-urgent as I have someone from nationals checking out the site in the morning. and I'd rather him not look at a blank page
So now my database has a set of tables with the prefix jos_ and a set with bak_. Now the bak_ ones are my old site and the jos_ ones are the 'new' content the installer made.
So how would I write an sql or php script to delete all of the jos_ tables and rename the bak_xxxx tables to jos_xxxx? I'm about to shoot myself. especially since I didn't backup.
this is semi-urgent as I have someone from nationals checking out the site in the morning. and I'd rather him not look at a blank page
0
Comments
Nuke each table: Rename each table:
Just do it one at a time. Writing a pattern-matching PHP file is just going to make this all more prone to disaster. And get phpmyadmin. It makes this all simple and you can learn the SQL from it.
Dude - what where you thinking?
Always *ALWAYS* backup before you start messing around with that stuff. Furthermore, why would you do it now if you kinda needed it up and running for nationals.
I say this not to be mean, but to point it out with a halo in hopes that you have learned from this make.
P.S. I've been in a similar state before, I've banged my head off the wall enough times to learn the lessons the hard way. Welcome to the club.
I'm just glad to have joomla functioning again. the backed was fubar.
Oh yeh, I have phpmyadmin. I know I can select all those tables and drop them, I'm sure there isn't anyway to point and click to rename them is there?
Inside the sql tab phpmyadmin would I type:
since I will already be accessing that database. I just dropped all the jos_ tables.