How can I fix this MySQL query ?

admin

Administrator
Staff member
SELECT drivers.driver_id, drivers.tipo_prodotto, drivers.prodotto_id, drivers.categoriadrv_id, drivers.nomefile, drivers.dimensione, drivers.versione, drivers.datadrv, drivers.descrizione, sistemioperativi.so_id
FROM sistemioperativi INNER JOIN (drivers INNER JOIN relazioniso ON drivers.driver_id = relazioniso.driver_id) ON sistemioperativi.so_id = relazioniso.so_id
WHERE (((drivers.tipo_prodotto)="n") AND ((drivers.prodotto_id)=2) AND ((drivers.categoriadrv_id)=2))AND ((sistemioperativi.so_id)=5));

It works fine until I give defined values but as I say:

((sistemioperativi.so_id) LIKE '%'));

than the results are repeted once for each operatingsystem related to the driver.

How can I get only one result for each driver corresponding to the query parameters ?

Thank you
 
Back
Top