Okay, I messed up big time on my site and I hope someone can help me restore one of my tables. I am using mysql with php. There are two tables that I use. First table is called "AM". Second table is called "AM2". Fields that are used in both tables are "username" and "paid" . Basically, AM2 is a backup of AM. AM lists all my users and the amount they paid. AM only shows the latest transaction, while AM2 shows the latest, plus all previous transactions. AM2 has an additional field called AM2_id.
Example: Table AM would show username "Joe" paid "9.99" while
Table AM2 would show username "Joe" paid "2.99", username "Joe" paid "3.99", username "Joe" paid "9.99"
Where as table AM shows only the username with the last price paid, AM2 will show multiple entries of the same username with what they paid each time.
The last field AM2_id which is on AM2 table is basically the id number for each entry, the last entry of course having the highest id number.
I messed up and made every "paid" entry in AM to read all one value.
The values in the paid column are actually yes, yes2, yes3, yes6 and yes12
My question is this--- Is it possible to make a script where I can retrieve the last value entered for each username using the fields I mentioned from table AM2 and then take this last vlaue entered and restore this value to the appropriate username in table AM?
Thank you to anyone that can help me with this.
Owen the Samoan