And what is the format of a manufacture ?
I think it's like this one:
1th: manufacturname
LA bug factory
2th: date_time
2008.01.01 18:45:01
And you have a table, like this:
manufactures this is the table's name
id
manufacture_name
memanufacture_name
date_time
active
And you wrote a program, which gets the lines from that CSV file, and gets it's data.
And you insert that manufactures into the table with the current date. If it has a value, but the active flag is 0, you might not insert that data into your database.
And you don't write into a database a manufacture which has a freher date_time value in the database then in the CSV value is.
Then when you list the values, use this formula:
manufactures.active is an active flag of you manufacture table.
SELECT manufactures.manufacture_name, Max(manufactures.date_time) AS MaxOfdate_time, manufactures.active
FROM manufactures
GROUP BY manufactures.manufacture_name, manufactures.active
HAVING (((manufactures.active)="Y"))
ORDER BY manufactures.manufacture_name;
Here is the table and the management part of a manufacture table. Lets write a password and username acces into that:
http://www.phpcode.hu/phpgenerator2/teszt/manufactures.doc
good luck.
0o0o0;10890108 wrote:anyone? im seriously drained.
I was trying to use distinct for this.. but repeatedly I had no idea what was going on.. finally i realized after numerous trial and error ( 2 1/2 weeks 8 hours a day solitaire on this &S&S S ##%@&& snaggggggg) that distinct*** just pulls current the date of all duplicates and meshes it in with OLD data. man was I p'd when i finally figured out what was going wrong. .... lol now i thinking no.. it was group? oh well...
so now instead of using dates coming from the cvs file.. im just recreating them as (CURDATE()) as entrydate. Instead.. and any new updated tomorrow will compare newer then yesterdays.
SO.. the question is does anyone have any examples of say a column called manufacturer and a col of entrydate where they are selecting to a temp table all the current dates to manufactors and sending just the newest rows to a temp table.
( have old manufacturers that dont have new dated rows so they have to be saved .. so completely wiping the first table and just bringin in the new data will not work.)
this has been one huge task for me.. anyone who can help me out would be awsome.