Hej.
Jeg er ved at kombinere 2 contribs og har brug for at hente produktbeskrivelse i database.
Jeg har taget dette fra en velfungerende "product_listing.php
$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$listing['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);
$description['products_description'] = substr($description['products_description'], 0, 130);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';
Som via denne linie:
strip_tags($description['products_description']
Sætter beskrivelse ind...
Men jeg får denne fejlmelding:
1064 - 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 '&& language_id=4' at line 1
SELECT `products_description` FROM `products_description` WHERE products_id = && language_id=4
Er der een der kan hjælpe mig......
Det virker jo i product_listing.php
/AgentJensen