Jump to content

Pulling data from two tables, compare, and output?


NewcastleFan

Recommended Posts

Hey Guys,

 

I'm struggling with some logic of how to do something wondering if anyone can point me in the right direction.

 

Details:

I am making a PHP/MySQL game to learn more PHP, I've got my login/logout system created. However I am planning on the game been map based on a 100x100 grid. I have two tables:

 

USERS

Username, Password, x, y

Test, Test, 1, 1

 

 

MAP

X, Y, type

0,1,1

0,2,1

0,3,2

0,4,3

0,5,2

etc

 

I am stuck on how to get the user's logged in X and Y coordinates and then compare them with the map table X and Y, to see what type of field to show, 1,2 or 3.

 

Is there a name for this type of function so I can do some research on it? Or could someone give me an example? Would be fantastic if anyone has any advice.

 

Thanks in advance

NewcastleFan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.