I would like to ask if your suggestion method is the same as mine? When I want to use artificial intelligence to collect information {code ...} however, if I need to write $ row [id] in the record to do other tasks, I have to put mysql_query in while so that I can know the $ row of each shard. [id] like this {code ...} so every... I would like to ask if your suggestion method is the same as mine?
When I want to use fake settings to collect information
While ($ row = mysql_fetch_array ($ SQL) {information display ...}
But I need to write $ row [id] in the information to do other things.
I have to put mysql_query in while so that I can know the $ row [id] of each shard.
Like This
while ($row=mysql_fetch_array($gettimeline)){$sql2 = mysql_query("SELECT * FROM `xxx`WHERE `id` = '".$row['id']."'");}
In this way, after each piece of information comes out
Won't He Repeat $ sql2 of each shard to check the Shard?
Is this method correct?
The same is true for ajax.
I want to delete an article to get the id of this article. I still have to put it in the while loop.
while ($row=mysql_fetch_array($gettimeline)){$sql2 = mysql_query("SELECT * FROM `xxx`WHERE `id` = '".$row['id']."'");《script》 $("#remove_timeline_
").click(function(){ $.ajax({ type: "POST", url:"remove?to=
", cache: false, success: function(){ } }); } }); 《script》 }
In this way, each batch will have a re-built ajax and query. the more queries, the slower the query will be ....
What can we do?
Reply content:
I would like to ask if your suggestion method is the same as mine?
When I want to use fake settings to collect information
While ($ row = mysql_fetch_array ($ SQL) {information display ...}
But I need to write $ row [id] in the information to do other things.
I have to put mysql_query in while so that I can know the $ row [id] of each shard.
Like This
while ($row=mysql_fetch_array($gettimeline)){$sql2 = mysql_query("SELECT * FROM `xxx`WHERE `id` = '".$row['id']."'");}
In this way, after each piece of information comes out
Won't He Repeat $ sql2 of each shard to check the Shard?
Is this method correct?
The same is true for ajax.
I want to delete an article to get the id of this article. I still have to put it in the while loop.
while ($row=mysql_fetch_array($gettimeline)){$sql2 = mysql_query("SELECT * FROM `xxx`WHERE `id` = '".$row['id']."'");《script》 $("#remove_timeline_
").click(function(){ $.ajax({ type: "POST", url:"remove?to=
", cache: false, success: function(){ } }); } }); 《script》 }
In this way, each batch will have a re-built ajax and query. the more queries, the slower the query will be ....
What can we do?
What does "circle" mean by "loop?
When the number of data entries increases, the number of requests increases. generally, such external IO duplicates will be considered for merging.
For example:
SELECT * FROM `xxx` WHERE id in (1,2,3,4,5)