reegan29
reegan29

Reputation: 930

Mysql query throw the 1054 unknown column error?

my Mysql query throw the 1054 unknown column interleaving.pdf?

SELECT user_id,doc_id,name
FROM `get_edoc_details`
WHERE user_id=290
  AND doc_id=1
  AND name=interleaving.pdf;

Upvotes: 1

Views: 67

Answers (1)

Swagata
Swagata

Reputation: 622

You'll need to enclose the value of the field in quotes as it is a string.

SELECT user_id,doc_id,name FROM `get_edoc_details`
WHERE user_id=290 AND doc_id=1 AND name='interleaving.pdf';

Upvotes: 1

Related Questions