Query virker ikke (efter ændring)
Hejsa,Jeg forsøgte at tilføje nogle kriterier til min eksisterende query, men kan ikke få det til at virke:
Problemet opstår når jeg forsøger at smide $specifications ind i querien. Koden:
$specifications = "WHERE 1=1";
if(!empty($specifications_brand)) {
$specifications .= "AND brand='$specifications_brand' ";
}
$query = mysql_query("SELECT
DISTINCT( b.id )
,b.brand
,b.brand_link
,b.id
FROM
brand b $specifications
INNER JOIN
series s
fejl meddelse:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN series s ON b.id = s.brand_id AND s.type
