it’s the first time I developp such tool you all know (the possibility to compare articles according to price and/or options)
Since I never did that i want to tell me what do you think of the way i see that :
On the database we would have :
offer / price / option 1 / option 2 / option 3 / IDseller / IDoffer
best buy / 15$ / full FTP / web hosting / php.ini / 10 / 1
.../..../....
And the request made by the client :
"SELECT * FROM offers WHERE price <= 20 AND option1 = fullFTP";
I don’t know if it seems OK to you.
Plus i was wondering, how to avoid multiples displays for the same seller (not on the DB but only on the front-end).
Imagine you have multiple offers with a price <= 20 with the option FullFTP for the same seller, i don’t want him to be shown 5 times on the comparator.
If you have any advices 😉
Thanks
You want to read about database normalization and 3rd normal form.
You may also need to timestamp your rows and include those ranges in your query.
You should move your options to a separate table and aggregate options with a deal in a associative table.
That gets you a lot closer to where you need to be and it will make things a lot easier.
Next… SQL joins