我使用sql查询在表上列出数据。如果两个日期之间的差异(开始结束日期)长10天数据没有列出,网页给出内部服务器错误。
我们可以做些什么来解决此错误。
我的MySQL查询列表数据:
$sql1 = "
select
-- a.order_id as Siparis_No,
a.firstname as isim,
a.lastname as Soyisim,
c.name as Tcno,
a.email,
concat(a.telephone, ' - ', a.fax) AS telefon,
f.card_number as KartNo,
b.name as urun_Adi,
b.quantity as Adet,
REPLACE(b.total, '.0000', '') as Toplam,
if (a.order_status_id in (17,15,2),'BASARILI','BASARISIZ') as odeme_Durumu,
a.date_added as Tarih1,
concat(a.payment_address_1,a.payment_address_2,a.payment_city,a.payment_country,a.payment_zone) AS adres,
a.comment as Acikklama,
a.order_id as Siparis_No,
-- a.payment_firstname as odeme_isim,
-- a.payment_lastname as odeme_Soyisim,
-- a.payment_company as odeme_sirket,
REPLACE(a.total, '.0000', '') as Toplam,
a.order_status_id,
a.currency_code as DovizKodu,
a.date_modified as Tarih2,
a.ip,
b.product_id as urunID,
b.model as urun_Tipi,
b.price as Tutar,
d8.value as BaskasininAdinaIse,
d1.value as Hissedar1,
e1.value as Hissader1Tel,
d2.value as Hissedar2,
e2.value as Hissader2Tel,
d3.value as Hissedar3,
e3.value as Hissader3Tel,
d4.value as Hissedar4,
e4.value as Hissader4Tel,
d5.value as Hissedar5,
e5.value as Hissader5Tel,
d6.value as Hissedar6,
e6.value as Hissader6Tel,
d7.value as Hissedar7,
e7.value as Hissader7Tel
from zisl8_mijoshop_order a
left join zisl8_mijoshop_order_product b
on a.order_id=b.order_id
left join zisl8_mijoshop_customer_to_field c
on a.customer_id=c.customer_id
left join zisl8_mijoshop_order_option d1
on a.order_id=d1.order_id and d1.name='Hissedar 1' and b.order_product_id=d1.order_product_id
left join zisl8_mijoshop_order_option d2
on a.order_id=d2.order_id and d2.name='Hissedar 2' and b.order_product_id=d2.order_product_id
left join zisl8_mijoshop_order_option d3
on a.order_id=d3.order_id and d3.name='Hissedar 3' and b.order_product_id=d3.order_product_id
left join zisl8_mijoshop_order_option d4
on a.order_id=d4.order_id and d4.name='Hissedar 4' and b.order_product_id=d4.order_product_id
left join zisl8_mijoshop_order_option d5
on a.order_id=d5.order_id and d5.name='Hissedar 5' and b.order_product_id=d5.order_product_id
left join zisl8_mijoshop_order_option d6
on a.order_id=d6.order_id and d6.name='Hissedar 6' and b.order_product_id=d6.order_product_id
left join zisl8_mijoshop_order_option d7
on a.order_id=d7.order_id and d7.name='Hissedar 7' and b.order_product_id=d7.order_product_id
left join zisl8_mijoshop_order_option e1
on a.order_id=e1.order_id and e1.name='Hissedar 1 Cep Tel' and b.order_product_id=e1.order_product_id
left join zisl8_mijoshop_order_option e2
on a.order_id=e2.order_id and e2.name='Hissedar 2 Cep Tel' and b.order_product_id=e2.order_product_id
left join zisl8_mijoshop_order_option e3
on a.order_id=e3.order_id and e3.name='Hissedar 3 Cep Tel' and b.order_product_id=e3.order_product_id
left join zisl8_mijoshop_order_option e4
on a.order_id=e4.order_id and e4.name='Hissedar 4 Cep Tel' and b.order_product_id=e4.order_product_id
left join zisl8_mijoshop_order_option e5
on a.order_id=e5.order_id and e5.name='Hissedar 5 Cep Tel' and b.order_product_id=e5.order_product_id
left join zisl8_mijoshop_order_option e6
on a.order_id=e6.order_id and e6.name='Hissedar 6 Cep Tel' and b.order_product_id=e6.order_product_id
left join zisl8_mijoshop_order_option e7
on a.order_id=e7.order_id and e7.name='Hissedar 7 Cep Tel' and b.order_product_id=e7.order_product_id
left join zisl8_mijoshop_order_option d8
on a.order_id=d8.order_id and d8.name='Baskasinin Adina Ise Yardim Yapanin Adi' and b.order_product_id=d8.order_product_id
left join zisl8_mijoshop_card_numbers f
on a.order_id=f.order_id
where a.date_added > '$t_bas' and a.date_added < '$t_bit' and a.firstname like '%$adi%' and a.lastname like '%$soyadi%'
order by a.order_id,a.order_id
";
感谢。