select values from mysql using php array of ids

Solutions on MaxInterview for select values from mysql using php array of ids by the best coders in the world

showing results for - "select values from mysql using php array of ids"
Antonio
13 Jan 2019
1$sql = 'SELECT * 
2          FROM `table` 
3         WHERE `id` IN (' . implode(',', array_map('intval', $array)) . ')';