美好的一天,我尝试run queries
为searching
但我得到了这个结果
错误号:IMSSP / -59
超出内存限制10240 KB 缓冲查询
这是我的查询
SELECT * From transaksi a
left join Outlet b on a.Outlet = b.OutletCode
left join area c on b.areacode = c.areacode where b.BrandCode like '%AR-1%'
and b.areacode like '%%' and b.OutletCode like '%%' and tanggal
between '2016-03-01' and '2016-07-31'
从我上面的查询中得到16046 rows
。
- 测试 -
当我尝试进行仅显示10 rows
的其他搜索时,该错误未显示。
SELECT * From transaksi a
left join Outlet b on a.Outlet = b.OutletCode
left join area c on b.areacode = c.areacode where b.BrandCode like '%AR-1%'
and b.areacode like '%%' and b.OutletCode like '%K-SRLM%' and tanggal
between '2016-05-01' and '2016-05-10'
这里没有使用range
显示411 rows
SELECT * From transaksi a
left join Outlet b on a.Outlet = b.OutletCode
left join area c on b.areacode = c.areacode where b.BrandCode like '%AR-1%'
and b.areacode like '%%' and b.OutletCode like '%K-SRLM%'
这是我的全文。
function show_it()
{
extract(populateform());
if($date_search == "")
{
unset($date_search);
}
if(isset($date_search)){
$explode = explode('-',$date_search);
$start_date = inggris_date($explode[0]);
$end_date = inggris_date($explode[1]);
$result = $this->modelmodel->showdata("SELECT * From transaksi a
left join Outlet b on a.Outlet = b.OutletCode
left join area c on b.areacode = c.areacode where b.BrandCode like '%$tipenya%'
and b.areacode like '%$area%' and b.OutletCode like '%$outlet%' and tanggal
between '$start_date' and '$end_date'
");
}else{
$result = $this->modelmodel->showdata("SELECT * From transaksi a
left join Outlet b on a.Outlet = b.OutletCode
left join area c on b.areacode = c.areacode where b.BrandCode like '%$tipenya%'
and b.areacode like '%$area%' and b.OutletCode like '%$outlet%'
");
}
}
答案 0 :(得分:0)