0

I am listing data from database using "where in" statement, and I don't have problem when my array is short, but I am not able to run this request with long array.

This is my code:

$dbc= new PDO(...);
$numbers="1,2,3,4,5,6,7,8";
$run=$dbc->prepare("SELECT * FROM users WHERE id IN ($numbers)");
$run=execute();

How can I run this code when my numbers is like:

$numbers="1,2,3,4,5,6,7,...3997,3998,3999,4000";
mandza
  • 330
  • 9
  • 24

0 Answers0