Re: PHP & MySql if....
Hello LLFitness_Derek. Perhaps that's why I haven't got a lot of responses, lol!
The table actually has 22 columns with a column called ord_num (order number) that serves as it's unique identifier. The operation I'm trying to work on only updates the 6 columns that I mentioned in my first post.
Sorry for any confusion, still very new to this...
This table stores some extra information about a customers order.
vend1, 2 and 3 are for names of vendors and odate1, 2, 3 are dates in which orders are placed. Vendors and order dates are related to each other in that each vendor entry should have a corresponding order date. So if there is an entry in the vendor column (say vend1) then there should be a corresponding date in the order date (odate1). This way we know that the product was order from X vendor on X date.
What I'm trying to do is when one of our reps hits a submit button to send the order to the vendor, the vendor name and order date are updated in the table automatically.
Now I've made room for 3 vendors and corresponding order dates (which "should" be more than enough) in the table. However, on rare occasion, we do send orders to more than one vendor so I want to make sure we don't over write any information that is already in the table.
So that's where my original post comes from. I don't want to over write vendor and order date information if there is already some in the table. I just can't figure out how to do that.
Hopefully that makes a bit more sense.
Thanks,
DaK
|