Jump to content


User Creates Multiple Characters

binding user characters mysql

  • Please log in to reply
1 reply to this topic

#1 woj56k

  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 31 December 2012 - 03:29 PM

Hello, I'm not sure if this is in the right area but if it's not please feel free to move it.

I'm in the process of creating a game where a user from the users table will be allowed to create and select characters that are binded to that users profile. Allowing users to have up to two characters that can be selected to "Play As" after login in with the user account. My problem is since while I am not extremely new to php, this approach has me a bit stumped. How could I bind characters created by a userid to that userid?

Is it something simple that I missed and just am over thinking? For example sake, we'll use 'users' table and 'characters' table. Any help or suggestions?

Much appreciated!

#2 Muddy_Funster

  • Members
  • PipPipPip
  • Advanced Member
  • 3,383 posts

Posted 31 December 2012 - 03:33 PM

have a userid field in the characters table and use an INNER JOIN to link the tables together.

Please: "This doesn't work..." is not a question.  We're not the government: we don't have anything to view what your doing on your computer.  Help us help you by asking a good question.


"Things needed to ask a "good" question:

  • A description of the context of your issue (Optional but can be a huge help in certain circumstances)
  • What is the actual problem (Mandatory)
  • What does the code actually do (Mandatory)
  • What you think the code should do / What you want the code to do (Mandatory)
  • What things have you tried so far (Optional, but missing it out just wastes your time and ours)
  • The actual code as you are running it - minus any personal information like Database Login Credentials (Mandatory - don't just post pseudo, the vast majority of issues are syntax and not logic)
  • As much info about your development environment as you can give - even if it's just letting us know you are using a hosting provider instead of a local install (Optional, but some questions can not be answered without it.)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users