php - Difference between sqlsrv_fetch_array and sqlsrv_fetch_object -


im working php , ms sql server 2005 , 2012 , question difference between sqlsrv_fetch_array , sqlsrv_fetch_object?

sqlsrv_fetch_object

returns object on success, null if there no more rows return, , false if error occurs or if specified class not exist.

sqlsrv_fetch_array

returns array on success, null if there no more rows return, , false if error occurs.

so difference 1 returns array , other returns object.

which 1 better?

neither, subjective preference 1 use. depends upon own implementation. both job done.

this code worked in ms sql 2012 doesn't in ms sql 2005. suggestions, thanks

error messages can tell more can.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -