我有一个在PHP和MySQL中运行的站点,最近它已经开始没有响应而没有加载页面。我的Web主机因为开放流程而说出来了:
Id User Host db Command Time State Info
28312497 eximstats localhost eximstats Sleep 0 NULL
42808356 integra_integra 82.152.148.162:63299 integra_integra Sleep 3177 NULL
42808809 integra_integra 82.152.148.162:63302 integra_integra Sleep 3057 NULL
42813450 integra_integra 82.152.148.162:63308 integra_integra Sleep 2714 NULL
42824809 integra_integra 82.152.148.162:63313 integra_integra Sleep 2605 NULL
如何确保流程不会保持开放?
我的查询如下:
$sql="SELECT * From table where... ";
$rs=mysql_query($sql,$conn);
然后:
$result=mysql_fetch_array($rs);
或
while($result=mysql_fetch_array($rs))
{
echo data here...
}