I need to get time of script execution in my PHP code. On a database client I can use:
set statistics time on
And I would see messages like:
W (1): Parse and Compile Time 0.
W (2): Adaptive Server cpu time: 0 ms.
W (3):
W (4): Execution Time 0.
W (5): Adaptive Server cpu time: 0 ms. Adaptive Server elapsed time: 0 ms.
I'm using odbc-driver
to connect to Sybase and odbc_connect/odbc_exec
to execute query. Can I get these messages in my PHP code? Or I should set time manually using declare @time_start
etc.. or setting time in php code before and after query execution?