php - Efficient way to query database from an array -
i have array containing 400 10-20 character, single string number items. want query database array in efficient way (on server load , load time) possible. here have takes 4-6 seconds load page.
foreach(unserialize(mysqli_fetch_array(mysqli_query($database, "select `array` `users` `id` ='00000001'"))[0]) $value) { $friend_id = mysqli_fetch_array(mysqli_query($database, "select `id` `users` `id` ='".$value."'"))[0]; if(!empty($friend_id)){ echo mysqli_fetch_array(mysqli_query($database, "select 'username' `users` `id` ='".$value."'"))[0] . "<br />"; } }
Comments
Post a Comment