View Full Version : displaying multiple items *help*
dopex
10-30-2005, 02:11 AM
im making a website , (cant think straight right now), and i am wondering how i can display more than one thing. cause its going to store coordinates. (these coordinates are where people are at) and i have a mycoords.php page and it will(it doesnt yet) list all the coords they decide to add. do you have any idea of how i could go about doing that? don't tell me the exact code i could use, i just need a place to start. thanks :rolleyes:
Serex
10-30-2005, 12:22 PM
Asuming your just wanting to store, display or possibly graph the coordinates, i would strongly suggest the use of a database driven page. Your table could be made up of sections containing data depending on how many dimensions your going to encorparate. i.e coord_x, coord_y, coord_z (3 dimensional). You will then be able to display any or all data sets when needed.
For more information google search "mysql+php" or something similar. Post back if you need more info.
dopex
10-30-2005, 04:52 PM
yeah i found an ebook "Build a mysql driven page" or something like that. Uhm, and its going to be 2 coordinates. So, what I would have to do is for every time a user registers, have it make a table titled the users name, and when they decide to add a coordinate, make it add another field?
Serex
10-30-2005, 11:37 PM
No need for creating a new table every time a new user registers, just create the initial mysql table with say the following fields:
- id
- coord_x
- coord_y
- user
you can add any other info you need for logging (i.e time, date ect) if you need to. Once you have your table set up correctly you can use select statements to see what user has added what data
SELECT * FROM tblCoord WHERE user = "dopex"
or something similar, your ebook should run through how you can format all the queried data into tables for clean display.
hope it helps
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.