Okay. I'm making a character database for a writing RPG and I'm a little stuck.
The characters are allowed to have multiple jobs. Then for each job, they also have a job rank. However, some characters only have one job, whereas others have up to around seven or so.
So here's how my table is set up:
CHARACTERDB
id
name
surname
siblings
siblingsid
jobs
jobsranks
Then I have all of the character's different jobs in the jobs area separated by commas. Then the different ranks separated by commas as well.
So the Jobs part containts the value of "Hunter,Weaver,Sailor", or something like that, and the ranks but contains the value "Basic,Apprentice,Basic".
What I want to do is cycle out each job and rank from the database, so that it would read:
Primary Job: Hunter, Basic
Secondary Job: Weaver, Apprentice
Tertiary Job: Sailor, Basic
I'm just not sure how I'd do that. I've been looking at "foreach" statements, but I'm not sure if I'm on the right track or what. Any advice would be great.