Building a bit of a personal learning project but not quite sure of best practices or standard ways to go about doing simple things yet so perhaps someone could lend a hand here:
I have 3 tables: cars, computers, books - and each one has it's own fields - cars has engine size and transmission, computers has CPU speed and ram, books has author, title etc. I want a user to be able to input a multiple amount of either (based on how many they own) which are saved one by one, and then when they're finished, it gives them an unheaded list of everything they typed in (as in, just prints all the fields in each record side by side), in the order they entered them.
If I had to guess, this is what I'd do: at first load, give the user a unique session id. As they enter their stuff, their session id goes into each item table against the item they just created. Then when they're finished, query all the tables by the session id and list the results. But how would I order them in the order they were input (as they're coming from different tables), and would it be possible to alter that order afterwards (by clicking a moveup/down button from the list).
Thanks to anyone who can shed any light.
I have 3 tables: cars, computers, books - and each one has it's own fields - cars has engine size and transmission, computers has CPU speed and ram, books has author, title etc. I want a user to be able to input a multiple amount of either (based on how many they own) which are saved one by one, and then when they're finished, it gives them an unheaded list of everything they typed in (as in, just prints all the fields in each record side by side), in the order they entered them.
If I had to guess, this is what I'd do: at first load, give the user a unique session id. As they enter their stuff, their session id goes into each item table against the item they just created. Then when they're finished, query all the tables by the session id and list the results. But how would I order them in the order they were input (as they're coming from different tables), and would it be possible to alter that order afterwards (by clicking a moveup/down button from the list).
Thanks to anyone who can shed any light.