Hello, How can i use select where function for 2 things? SELECT id, title FROM web WHERE category=10 PHP: this works but i want to add category=11 aswell. when i do SELECT id, title FROM web WHERE category=10 AND category=11 SELECT id, title FROM web WHERE category=('10', '11') PHP: it does not work.
You need an OR, not an AND. Or use the IN (..) syntax. SELECT id, title FROM web WHERE category = 10 OR category = 11 SELECT id, title FROM web WHERE category IN (10,11) Code (markup):