how can you add quotes in a sql query if the field names includes “-” or other charactors or if the field has a reserved name like “type” or others
SELECT `enclosure.id`, `enclosure.time`, `enclosure.note`
FROM tbl.enclosure LEFT JOIN tbl.book ON book.enc_id=enclosure.id
WHERE `book.book_id`='277' ORDER BY enclosure.time DESC, enc_id_ DESC
error
#1054 - Unknown column 'enclosure.id' in 'field list'
I’m not sure if I got you correct, but I think you should replace
with
.