Berikut contoh T-SQL dan mendapatkan value nya di PHP
Hasil nya adalah sebagai berikut
FIELD=>23
ROWS=>1
METADATA[{"Name":"step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"step_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"subsystem","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"command","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"flags","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"cmdexec_success_code","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_success_action","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_success_step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_fail_action","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_fail_step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"server","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"database_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"database_user_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"retry_attempts","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"retry_interval","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"os_run_priority","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"output_file_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_outcome","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_duration","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_retries","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_date","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_time","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"proxy_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1}]
VALUES2
ROWS=>1
METADATA[{"Name":"step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"step_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"subsystem","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"command","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"flags","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"cmdexec_success_code","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_success_action","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_success_step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_fail_action","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"on_fail_step_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"server","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"database_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"database_user_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"retry_attempts","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"retry_interval","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"os_run_priority","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"output_file_name","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_outcome","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_duration","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_retries","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_date","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"last_run_time","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1},{"Name":"proxy_id","Type":12,"Size":0,"Precision":null,"Scale":null,"Nullable":1}]
VALUES2
Point penting agar T-SQL dapat di parse di PHP adalah array("Scrollable"=>SQLSRV_CURSOR_CLIENT_BUFFERED)