خرید بک لینک
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  

برچسب: نویسنده: آیلین رضوانی تاريخ: شنبه 1 ارديبهشت 1397 ساعت: 18:29

صفحه بندی