I'm too lazy to write a .py or .php script to convert all of the requirements into mysql query.
SO, someone please write a conversion script from: (It should scan through every requirement we have!)
1.Gameboy Rave! [422 Combo]
(5) - AAA
(4) - 5 goods or better
(3) - 20 goods or better
(2) - 100 goods or better
(1) - pass the song
to
$table will not be shared.
$levelid should be an int. (1234)
$reqs should be a string. (0:20:50:100) Good requirement, do not include pass requirement.
INSERT INTO $table (`songid`, `requirements`) VALUES ($levelid, '$reqs');
Please write it, and post it here in [code] blocks.
Thanks.
So you're asking for a conversion with the requirements as a string as an input and the mysql query as an output? If that's the case, I don't know how the level id would be obtained from said input alone.
Derp, I just noticed you were asking for .php or .py script, languages I don't know. xD My most fluent language is Java. If you are familiar with Java, I can make a class file with a method that returns the array you asked for, or I can do something that takes a text file with the requirements and returns a text file with the song name and requirement on each line like:
Gameboy Rave!$0:20:50:100
Song #2$0:4:20:30
//etc
(There isn't any song title with a '$' character, so it would be a good choice for a delimiter.)
Derp, I just noticed you were asking for .php or .py script, languages I don't know. xD My most fluent language is Java. If you are familiar with Java, I can make a class file with a method that returns the array you asked for, or I can do something that takes a text file with the requirements and returns a text file with the song name and requirement on each line like:
Gameboy Rave!$0:20:50:100
Song #2$0:4:20:30
//etc
(There isn't any song title with a '$' character, so it would be a good choice for a delimiter.)
The text file would work perfectly reuben!
You can do it in Java, as I know java.
Ok, I'll see if I can finish it sometime tonight. I'm sucky when it comes to reading/writing from files, so I'm not going to have it done within the next 10 minutes or anything, lol. Once I get that part set up, the rest shouldn't be too bad.
(Btw, since you know Java well enough, it would be easier for me to do something where I make a class with a method that returns the requested array. But if the text file is more convenient, I'll do that.)
Ok, I'll see if I can finish it sometime tonight. I'm sucky when it comes to reading/writing from files, so I'm not going to have it done within the next 10 minutes or anything, lol. Once I get that part set up, the rest shouldn't be too bad.
(Btw, since you know Java well enough, it would be easier for me to do something where I make a class with a method that returns the requested array. But if the text file is more convenient, I'll do that.)
It would be more convenient to get the java files, so that I can make alterations if need be.
Comment