The mySQL IN clause allows you to search through records where values match what you are seeking. The examples below demonstrate its usage with a string or numbers.
// Querying a String $text_1 = "hello"; $text_2 = "world"; $command = "SELECT DISTINCT id, name FROM tablename WHERE id IN('$text_1','$_text2') "; // Querying Numbers $command = "SELECT DISTINCT id, name FROM tablename WHERE id IN(1250,1350) ";
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton