所以我有一个查询,当我放置某些限制,或直接从phpmyadmin运行工作完美.....但当我从我的PHP代码运行它它给我一个空白页面和错误 - ERR_EMPTY_RESPONSE。我知道错误发生在这行代码上:
$export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) );
这几乎就像查询超时一样,但我已经尝试更改php.ini中的变量以禁止它超时。在后端但不在文件中的查询是:
SELECT `tbl_entry`.`entry_id` , `tbl_entry_item`.`entry_item_id` ,
CASE WHEN `tbl_entry`.`in_out_type` = 'I'
THEN 'Inbound'
ELSE 'Shipped Out'
END AS 'Status', `tbl_customer`.`customer_name` , `tbl_serv_prov`.`name` AS 'Carrier_name', `tbl_origin_dest`.`name` AS 'Origin', destination.`name` AS 'Destination', `tbl_project`.`project_name` , `tbl_component`.`component_name` ,
CASE WHEN `tbl_entry`.`truck_arrive` < '1999-01-01 00:00:00'
THEN '0'
ELSE `tbl_entry`.`truck_arrive`
END AS 'truck_arrive',
CASE WHEN `tbl_entry`.`offload_begin` < '1999-01-01 00:00:00'
THEN '0'
ELSE `tbl_entry`.`offload_begin`
END AS 'offload_begin',
CASE WHEN `tbl_entry`.`offload_end` < '1999-01-01 00:00:00'
THEN '0'
ELSE `tbl_entry`.`offload_end`
END AS 'offload_end',
CASE WHEN `tbl_entry`.`truck_left_site` < '1999-01-01 00:00:00'
THEN '0'
ELSE `tbl_entry`.`truck_left_site`
END AS 'truck_left_site', `tbl_entry`.`pro_number` , `tbl_entry`.`checklist` , `tbl_entry`.`truck_rail_barge` , `tbl_entry`.`bol` , `tbl_entry`.`log_mode` , `tbl_entry_item`.`damage` , `tbl_entry_item`.`serial_number` , `tbl_entry_item`.`dmg_desc` , ds.`status_name` AS 'Damage_Type', `tbl_entry_item`.`fix_before_ship` , fs.`status_name` AS 'Fix_status', `tbl_entry_item`.`mpp_defect` , `tbl_entry_item`.`incident` , `tbl_entry_item`.`defect_avoided` , `tbl_entry_item`.`damage_source` , `tbl_entry_item`.`defect` , `tbl_entry_item`.`defect_comments` , `tbl_entry_item`.`incident_escalation` , `tbl_entry_item`.`incident_injury` , `tbl_entry_item`.`incident_report_link` , `tbl_entry_item`.`in_out_type` , `tbl_entry_item`.`outbound_entry_id` , `tbl_entry_item`.`outbound_entry_item_id` , `tbl_entry_item`.`incident_esc_sent` , `tbl_entry_item`.`defect_comment` , `tbl_entry_item`.`mpp_reason` , `tbl_entry_item`.`claim_check` , `tbl_entry_item`.`set_number` , `tbl_entry_item`.`customer_tag` , `tbl_entry_item`.`pad_number` , `tbl_eq`.equip_name, tbl_entry.on_site_status
FROM tbl_entry
LEFT JOIN tbl_entry_item ON `tbl_entry`.`entry_id` = `tbl_entry_item`.`entry_id`
LEFT JOIN tbl_customer ON `tbl_entry`.`customer_id` = `tbl_customer`.`customer_id`
LEFT JOIN tbl_serv_prov ON `tbl_entry`.`serv_prov_id` = `tbl_serv_prov`.`serv_prov_id`
LEFT JOIN tbl_origin_dest ON `tbl_entry`.`location` = `tbl_origin_dest`.`id`
LEFT JOIN tbl_origin_dest destination ON `tbl_entry`.`dest` = destination.`id`
LEFT JOIN tbl_project ON `tbl_entry`.`project_id` = `tbl_project`.`project_id`
LEFT JOIN tbl_component ON `tbl_entry_item`.`component_id` = `tbl_component`.`component_id`
LEFT JOIN tbl_status ds ON `tbl_entry_item`.`dmg_type` = ds.`status_id`
LEFT JOIN tbl_status fs ON `tbl_entry_item`.`fix_status` = fs.`status_id`
LEFT JOIN tbl_equip tbl_eq ON `tbl_entry`.`equip_id` = `tbl_eq`.`equip_id`
WHERE (
tbl_entry.`entry_status_id` !=1
OR tbl_entry.`entry_status_id` IS NULL
)
我错过了什么?