Query returns error 1242

ساخت وبلاگ
Hi,

I have table with id, refpost, type and comment fields. The comment field type is TEXT.
I need to get rows where refpost which has type='A' or type='D', which appear in comment field.


I tried this query:
Code:

SELECT id, refpost, type, comment
        FROM table
    WHERE comment
    LIKE
                  (
        SELECT refpost
                  FROM table
                  WHERE type='A'
                  OR type='D'
        )

But without result and i get error message: 1242: Subquery returns more than 1 row

This my table.
Attached Thumbnails
Click image for larger version. 
Name:	table1.jpg 
Views:	N/A 
Size:	50.4 KB 
ID:	17815 
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 178 تاريخ : شنبه 1 ارديبهشت 1397 ساعت: 18:29