Page 1 of 1

Have I lost data from my database indefinetly?

Posted: Sun Oct 29, 2006 7:18 pm
by impulse()
I stumbled across an old website log system I wrote a couple of months back when I was cleaning up old code and I noticed a field type in MySQL was set to 'Text' for a date entry. Immediatly I changed this to a 'Date' type and it set ALL current entries in the table to '00-00-0000'. But when I changed it back to 'Text' it still remained. Have I lost the original data indefinetly or is there a way to recover it?

Regards,

Posted: Sun Oct 29, 2006 7:20 pm
by nickvd
I doubt you will be able to, as the data that was contained in those fields has been converted... once you intval("40404.4040404") = 40404, you wont be able to floatval(40404) = 40404.4040404

Posted: Sun Oct 29, 2006 7:22 pm
by impulse()
I hope the following word to express myself isn't banned:


Bugger.

Posted: Mon Oct 30, 2006 3:42 am
by volka
Does your mysql server by any chance keep a binary log? see http://dev.mysql.com/doc/internals/en/r ... y-log.html

Now is the perfect time to develop and establish a backup plan.