query_posts thumbnail condition

the two single quote marks (after the number 1) in this line (of the top posted code section) seem to be causing the error – there should only be one single quote; shown below:

query_posts('orderby=date&cat=" . $cat . "&order=ASC&posts_per_page=-1');  

it is just puzzling that your other code (with the same error) alledegly does work (?)

if this is not the cause: what was the exact syntax error message?