Jump to content

mvchandoo

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mvchandoo

  • Rank
    Newbie
  1. Hi, Guru, It dont have any errors. so, Its not going into the below condition. die( print_r( sqlsrv_errors())); SQLSRV_CURSOR_BUFFERED = 'buffered';// both are similar. As per my investigation. If the stored procedure have multiple inserts into the tables. Then sqlsrv library is unable to fetch the data from the stored procedure. Hoping its a bug in library it self. Not sure. I am googling it since days.
  2. Sorry! My case is different, I am getting zero rows and false on executing via PHP, But, if I execute using sql manager 20 rows are coming. @Guru. Tq.
  3. I have a stored procedure with 2 parameters. I'm able to execute stored procedures with one parameter using the same script below. But I couldn't make it work with two parameters. $stmt = "{CALL VM_GETPRs_CAMPS (?,?)}";**//SP has 160 rows of data.** $fdate=date("Y-m-d"); $tdate=date("Y-m-d"); $params = array( array($fdate,SQLSRV_PARAM_IN), array($tdate,SQLSRV_PARAM_IN) ); $result = sqlsrv_query( $conn, $stmt,$params,array('Scrollable' => 'buffered')); //not getting any error if( $result === false) { die( print_r( sqlsrv_errors(), true) ); } else{ **//**I tried sqlsrv_num_rows and sqlsrv_has_rows sqlsrv_fetch_array all are giving zero rows.** $row_count = sqlsrv_num_rows( $result ); if ($row_count === false) echo "No rows"; else if ($row_count >=0) echo "\n$row_count\n"; //outputs 0 ---------------------------------- if(sqlsrv_has_rows($result)) echo "has rows"; else echo "No rows"; //outputs No rows ---------------------------------- $data = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC); var_dump($data); //outputs bool(false) I'm looking for a solution since four days. Please help me.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.