$result = $db->query('SELECT * '
. 'FROM catalog '
. 'WHERE cat_name = $cat '
. 'ORDER BY id DESC '
. 'LIMIT 100');
$result = $db->query('SELECT * '
. 'FROM catalog '
. 'WHERE cat_name = \'$cat\' '
. 'ORDER BY id DESC '
. 'LIMIT 100');