I am working on project, which will have limited PHP processes and possibly, many people will use the page. So I am trying to optimize it so the most (but secure) things will be handled clientside.
$result = mysqli_query($db, "SELECT * FROM userdata");
/*return $result; */
while ($row = mysql_fetch_array($result)) {
//do sth, e.g. get row to array
}
/*return $array;*/
My question is simple in this case. Looping through each line takes time and will block the php process for quite a time. So, is here some solution, taht you will simply send SQL requests, from DB server you will get response in shape of "some bunch of data", that I will be able to pass directly to jquery, where I can handle/sort/edit/make viewable the result using client resoruces and not server resources?
(so far, making sql request and passing $result
to jquery variable seems not returning anything, the jquery variable is empty)
Thanks in advance