I am used to presenting one-to-many related data in grid format. However, I have a requirement to basically re-fill the form from which it came from. For efficiency I would like to only execute one query. However, that will return multiple rows for the 'one' portion. How do people handle this scenario? Oddly enough, it is not covered in any of the PHP/MySQL books that I have. They only show one-one related data. TIA.
I usually use a join, and check for the 'one' item; e.g., adresses of people, I would sort by person ID, and verify that person ID is constant while outputting data. When the person ID changes, you output the name of the person again.
Could you post a code snippet of how you detect the change. Thanks.
Exactly u should post code to fix the bugs otherwise would be difficult to find exact problem .
website design