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 />";     } } 

look out joins in sql, e.g. @ page.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -