Hello,
I have a database for my products.
In there is a table with all the products and there is a table with te actual prices.
I need to select a product and inner join the price table an get the latest (read latest id) from the price table.
What is the best way?
Thanks!
Regards,
Paul
I have a database for my products.
In there is a table with all the products and there is a table with te actual prices.
I need to select a product and inner join the price table an get the latest (read latest id) from the price table.
What is the best way?
Code:
Table structure: products: ID int(3) PK Description text value varchar(250) lokation varchar(40) brand_id int(11) type_id int(11) article_id int(11) crediteur_id int(11) loaned int(11) repair int(11) Boxed int(11) barcode1 varchar(20) barcode2 varchar(20) artikelnr_supplier varchar(45) garantuee int(11) picture varchar(85)
Code:
Table price: id int(11) PK producten_id int(11) exclusive_price decimal(8,2) verwijderings_bijdrage_id int(11) tax_tarrif decimal(4,2) inclusive_price decimal(8,2) bruto_profit decimal(8,2) marge decimal(4,2) advice_price decimal(8,2) our_price decimal(8,2) porto_costs decimal(5,2) date datetime
Regards,
Paul
Comment