Hi, I have posted a question here previously regarding the query of 
talbles that contain duplicate entries in rows with only the id being 
different. My question was how to display or abtain ONLY the row with 
the highest id value in the result set along with all the other destinct 
rows in the table.
For a little more background:
The table hold data on properties, name, address,owner,property_code 
etc. What happens is that from time to time the data for a specific 
property is updated or changed or simply re-entered (on purpose or by 
mistake). The table needs to hold a record of each of these updates, 
erroneous or not, so I can't simply do an "update" when someone enters 
data. Now I need to pull a list of all the properties with some details 
like the address etc. So, obviously only the last entry for each 
property in the table will be of any value. I do have a date field, but 
sometimes the next update happens on the same day as the previous, so it 
won't work to test for the maximum date. Anyway, most of the replies I 
had all say I must create a new table and do joins etc, in my sql.
Now, my real question.
How are you supposed to construct a db for reading data like this. ie, 
it sounded to me like I was never supposed to read the data into one 
table but rather relational tables; making the selects possible without 
having to create a new table. So, I need some help in showing me how to 
create tables for such a system, plus some explanations on why etc.
I know I can and should find these things in books, but my MySQL book is 
en-route from amazon, and I need some help on this rather urgently!
Your help is really appreciated.

 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to