Hello everyone
I'm having a problem trying to figure out how to call the same id from the database. I am creating a card game and will be using a different image so that when a player picks a card, they wont know what card is being picked. The card that is being picked would have the same id. I am creating a second table on the database so that they can have the same id.
My cards get selected randomly and I want the opponents card to appear in the same order and id number.
Could someone help me by telling me how to do this?
Thanks
Calling same id from database
Moderator: General Moderators
Re: Calling same id from database
do you have any code for it yet?
-
mickster69
- Forum Newbie
- Posts: 5
- Joined: Thu Apr 14, 2011 7:31 am
Re: Calling same id from database
not yet. still trying to figure it out
Re: Calling same id from database
well to call the same id out of a database i would use "where" in my mysql_query telling it to grab certain data where a specified condition is met
-
strafingmoose
- Forum Newbie
- Posts: 15
- Joined: Mon Apr 18, 2011 2:56 pm
Re: Calling same id from database
So, basically, you generate a random number and want to use that same number later ?
-
mickster69
- Forum Newbie
- Posts: 5
- Joined: Thu Apr 14, 2011 7:31 am
Re: Calling same id from database
yes. The numbers stays the same for each card and when a new player picks that card, it moves onto their hand.
It's like if I had a hand of 1, 2, 3 and 4 and on your hand you had 6, 3, 8 and 7. I pick a card from you and won't know which one is picked until its placed onto my hand
It's like if I had a hand of 1, 2, 3 and 4 and on your hand you had 6, 3, 8 and 7. I pick a card from you and won't know which one is picked until its placed onto my hand