sql server - CakePHP 2.5 Debug MSSQL -


i have code working in cake 1.3 on same server, on new version of cake 2.5, when debug query blank ouput

app/model/appmodel

class appmodel extends model  {  public function connect_to_mssql() {      $server = 'sqlserver';      // connect mssql     $link = mssql_connect($server, 'user', 'password');     mssql_query("set ansi_nulls, ansi_warnings, ansi_padding, concat_null_yields_null, quoted_identifier on;");     if (!$link) {         die('something went wrong while connecting mssql');     }      $conn = mssql_select_db('database',$link);            $client = mssql_query('select top 10 * clients');      $row = mssql_fetch_array($client);     debug($row);     die(); } } 

output:

/app/model/appmodel.php (line 54) 

edit 1

just found problem it's debug() function, if use print_r array, know why?

debug work if "debug" config variable set number greater 0.

from cakephp debugging manual page:

to use debugger, first ensure configure::read(‘debug’) set value greater 0.

try writing this, either in core/config.php or in model before debug($row);

configure::write('debug', 1); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -