On Thu, 24 Jun 2021 at 10:55, Stephen Reay <php-li...@koalephant.com> wrote:
> but still I have to keep asking: Why integers at all? > While I'm not a fan of this approach, there is a lot of existing code and tutorials that use: $sql = 'WHERE id IN (' . implode(',', array_map('intval', $ids)) . ')'; $sql = sprintf('SELECT * FROM table WHERE id = %d;', intval($id)); Craig