Which is faster?
I store the SQL results in an array - which means 1000 or more IDs. And then I use in_array() function 30 times to find out MyID is in the database.
I check MyID is in the database and repeat it 30 times.
Test results:
48 records (MyID)
Array count: 1704 (ID) (Table size: 100 000)
Delta time:
Method 1: 0.0075759887695312
Method 2: 0.0038831233978271