<?php
require_once "include/config.php";$sql = "select distinct fb_bamodel from tblb_battery where fb_bacode in (select distinct fb_bacode from tblbatob_ba where fbatterycode='CB7310B.40H') and fclasscode='1' and fb_babrand='IBM'";
$result = @mysql_query($sql);
$row = @mysql_num_rows($result);
if ($row > 0)
{
while ($arr = @mysql_fetch_array($result))
{
echo $arr[0]."<br>";
}
}
?>
我换了种测试方法,版本是mysql5.0,能查询出,在本机测试,但第一次查询很慢,大概要20多秒,但刷新就很快了,http://localhost/test.php,开新窗口也很快,换了几个浏览器测试都很快,但就是第一次查询慢,比如说把"IBM"改为“COMPAQ”再查询就很慢了,但如重复上次查询又会很快
require_once "include/config.php";$sql = "select distinct fb_bamodel from tblb_battery where fb_bacode in (select distinct fb_bacode from tblbatob_ba where fbatterycode='CB7310B.40H') and fclasscode='1' and fb_babrand='IBM'";
$result = @mysql_query($sql);
$row = @mysql_num_rows($result);
if ($row > 0)
{
while ($arr = @mysql_fetch_array($result))
{
echo $arr[0]."<br>";
}
}
?>
我换了种测试方法,版本是mysql5.0,能查询出,在本机测试,但第一次查询很慢,大概要20多秒,但刷新就很快了,http://localhost/test.php,开新窗口也很快,换了几个浏览器测试都很快,但就是第一次查询慢,比如说把"IBM"改为“COMPAQ”再查询就很慢了,但如重复上次查询又会很快
解决方案 »
- 在php编写的网页中怎样调用C++程序?
- 刚接触php,死马当活马医,公司非要我用php,只好弄个程序改,遇到第一个问题
- access 查询放到数组问题
- 我重装的电脑,现在想编写并运行一下php的hello world,都需要下载什么软件,程序怎么写呢?? 帮帮我
- socket数据存储方面的问题
- 安全问题讨论
- 关于php的几个问题!
- 在excel中生成的web页,想用php将数据库的变量填到页面对应位置,然后再调用excel显示和打印,怎么做?
- 我想把PHP Manual翻译成中文,谁有兴趣合作?
- 帮我看看用什么函数可以实行下面的结果
- 请问,php文件如何阅读啊
- 文件存储和数据库存储,哪个占用的空间更大?
"select distinct fb_mamodel from tblb_machine where fb_macode='8616'"
"select distinct fb_macode from tblb_matoba where fbatterycode='CL740B.862'"
查询都很正常,但一组合就不行了,电脑会变得相当慢,结束mysqld-nt.exe就行了请各位帮帮我
接下来快,是应为数据是从高速缓冲区中取得的,不需要I/O操作如果组合起来,查询很慢的话,就把他分开来
我有个笨方法,不知行不,把第一条查询结果用一个while循环拼成第二条查询语句,执行第二条语句
$result = @mysql_query($sql4pre);
$a=array();
while ($arr = @mysql_fetch_array($result))
{
$a[]=$arr[0];
}$sql4 = "select distinct fb_bamodel from tblb_battery where fb_bacode in (".join(",",$a).") and fclasscode='1' and fb_babrand='$fb_babrand'";
$result4 = @mysql_query($sql4);
$num4 = @mysql_num_rows($result4);