sql server - Can't fetch the records by running SQL stored procedure in PHP -


the problem in fetching records sql stored procedure using sqlsrv_fetch_assoc.

if execute stored procedure in sql server getting records, while fetching records using php not getting records. can on issue.

the database connection working fine.

  **code :**    6 parameters passing stored procedure data types are:   @param1 varchar(20), @param2 varchar(2), @param3 int, @param4 varchar(10), @param5 varchar(20), @param6 varchar(20)   $sql = "{call local.data(     @param1 = 'local',     @param2 = '01',     @param3 = '2000',     @param4 = 'dynamic',     @param5 = 'performance',     @param6 = '10,15'     )}";       $result = sqlsrv_query($conn, $sql);              echo "<pre>"; print_r($result);                  if($result === false)                     {                         echo "error in executing statement.\n";                         die(print_r(sqlsrv_errors(), true));                     }                  else                 {                     $rowcount = sqlsrv_has_rows($result);                       if($rowcount == 0){                        echo "no rows ";                      }                      else {                        echo $rowcount;                      }                  } 

output of code: resource id #24 no rows


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -