On Thu, 24 Jun 2021 at 10:55, Stephen Reay <[email protected]> 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

Reply via email to