Alright, I'm creating a database for my IT business for tracking customers, machines, and jobs.
I have 3 tables: cust (customer info), mach (machine info), and jobs (specific job information).
Each table has a unique ID, auto inc. (cust = custID), (mach = machID), (jobs = jobID) (all IDs are numbers)
What I'd like to do is use a mysql_fetch_array to capture the results I need (differs per page based on what i'm doing)
the cust.php isn't an issue because that page only fetches the results from the cust table. No biggie, working fine.
mach.php is basically the same code as cust.php. The difference is mach.php, when queried, currently returns results from the mach table correctly, including the custID (a 5 digit number based on the cust table). So in the mach table, the custID is not an auto inc but rather a varchar field with the approriate custID (based on cust) for who owns the PC.
What I need to do on mach.php is to A) query the mach table, return all results in a nice table then B) compare the custID fields from mach (currently returned at the 5 digit number), compare it against the cust table, then map that number to the actual customer name (from the cust table) so instead of seeing "10001" for the custID field, it would show the actual customer name "John Doe".
I hope I described that good enough, if not I can try better
Peace
Sean