16 lines
910 B
PHP
16 lines
910 B
PHP
<?php
|
|
$_GET['ajax_save_single_sql'] = '1';
|
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
|
|
|
$fake_post = [
|
|
'section' => 'ipd',
|
|
'key' => 'refer_back_dest_trend',
|
|
'sql' => "SELECT COUNT(c.universal_item_value_text) AS cnt, concat(c.universal_item_value_text,' ',h.name) AS dest FROM universal_head b LEFT JOIN universal_detail c ON b.universal_head_id = c.universal_head_id LEFT OUTER JOIN hospcode h ON c.universal_item_value_text=h.hospcode WHERE b.universal_form_id = '124' AND b.vn IN (SELECT an FROM ipt WHERE dchdate BETWEEN :start AND :end) AND c.universal_item_id = '4713' GROUP BY c.universal_item_value_text ORDER BY c.universal_item_value_text"
|
|
];
|
|
|
|
// Mock php://input
|
|
file_put_contents('php://memory', json_encode($fake_post));
|
|
|
|
// wait, we can't easily mock php://input without a wrapper.
|
|
// So let's just make a curl request to the file via CLI using php -S if possible, or just look at the code.
|