As you will see I have split this from the Elegance theme discussion and moved it to the database forum so that those who know best to advise you as this not a theme related question. When you have the database fixed then please do come back and ask for help about the theme when ever you wish.
Cheers
Mary