Getting there….
the -> was coming because I forgot the ; at the end…
Haven't used a non-gui interface in a long time…
Anyway, here's what I did:
I created a upd_highscore.scr file that contains the delete and insert commands :
delete from highscore where hi_gameID=16;
insert into highscore (hi_gameID, hi_UID, hi_Uname, hi_score)
select ga_gameID, ga_UID, ga_UName, ga_score FROM gamerecord WHERE ga_gameID=16 ORDER BY ga_score desc limit 0,20;
Saved it, and am trying to run the file by using:
D:>mySQL powergame -e “upd_highscore.scr”
When I do that, I receive :
ERROR 1064 at line 1: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'upd_highscore.scr' at line 1
yet when I run the commands individually, they run fine??
Any help is appreciated 🙂