Vous avez besoin d'un JOIN
.
SELECT t1.*
FROM my_table t1
INNER JOIN my_table t2 ON t1.pid = t2.pid
WHERE t1.key = 'city' and t1.value = 'new york'
AND t2.key = 'country' and t2.value = 'united states';
Vous avez besoin d'un JOIN
.
SELECT t1.*
FROM my_table t1
INNER JOIN my_table t2 ON t1.pid = t2.pid
WHERE t1.key = 'city' and t1.value = 'new york'
AND t2.key = 'country' and t2.value = 'united states';