Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

need sql query

0614Feb 7 2017 — edited Feb 7 2017

hi,

im doing calculation in hierarchical way below are my details

CREATE TABLE `nodes_1` (

`parent` int(11) DEFAULT NULL,

`child` int(11) DEFAULT NULL,

`marks` int(11) DEFAULT NULL

)

data:-

pastedImage_0.png

in a query if i pass 5 as parent that calculate 2,3 child marks

and the same if i pass 15 as parent that should calculate 10,5 marks --5 already having 2,3 child. Result would be 200

same if i pass most parent 38 it should calculate 15,17,6 child marks --15 already holding 200 marks ,17 has two childs 9,8 marks ,6 no marks --result 230 e.t.c

thanks in advance.

Comments

xtbe
Answer

Found it out in the meantime, apparently there's a folder JavaPuzzleBall_SaveData in the home directory/folder containing 3 files which corresponds with the three categories in the puzzle game (basic, inheritance, lambda).

Each file contains a 0 or 1 value which indicates if you completed the puzzle or not. During startup there's probably a check if the files exist, if not they are created and initialized with zeroes.

Now you know this, don't try to "hack" the stuff ;-)

Marked as Answer by xtbe · Sep 27 2020
NickR2600-Oracle

ha ha, yep, that's it.  It's very hack-able.  At the time, I wasn't sure if the game would be played in a browser, downloadable, or both.  The data is saved locally for two reasons.  First is because that's what I knew how to code.  Second is because I didn't want people to lose their progress if they played online and decided to download later.

Nick

1 - 2

Post Details

Added on Feb 7 2017
2 comments
393 views