Welcome Guest, Not a member yet? Register   Sign In
Disadvantages of storing session data in MySQL?
#18

[eluser]jedd[/eluser]
[quote author="Devyn" date="1253399109"]
It must be a dumb question but I really have no idea that how can I know/listen when user click another card?
If it needs javascript/ajax, Cloud you please give me some url/tutorial/information to apply?
[/quote]

I've never coded anything like this, but as I understand it you need to store the state of a set (array) of cards. This state needs to be stored in the database. A card can be in the deck, discarded/waste, or be attached to a given user. There may be sub-states (attributed to a user, but not revealed to that user yet, etc). All this can be controlled entirely from the server end, which is why I'm confused about 'c10', for example, ever needing to be shown in the URL - or worse yet, why you might want to read the URL to work out what card a user has.

I don't see that you'd need javascript at all here, other than to make it prettier. As I see it you'd display - for a given user - the cards they have, and you'd have a button/link that would pull another card from the deck (that function merely selects a random item from, and then updates accordingly, the array stored in the DB).

You obviously need some logic in there to ascertain winning hands / when users have gone bust / etc.


Messages In This Thread
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 01:18 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 01:35 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 02:25 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 02:32 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 02:35 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:00 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:03 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:14 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:20 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:25 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-17-2009, 03:58 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-18-2009, 12:31 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 07:06 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 09:12 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 10:24 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 10:51 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 11:25 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 11:45 AM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 12:01 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 12:46 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 03:08 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 04:04 PM
Disadvantages of storing session data in MySQL? - by El Forum - 09-19-2009, 04:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB