Hi,
i have a code which is used to connect to database and get number of rows affteced from the SQL Query.
when i run the query connecting to postgres DB it gives num_row as 0, but when i run the query connecting to mssql server DB it gives num_row as -1. Below is my code.
$conn = odbc_connect('s erver','usernam e','password');
$sql = "SELECT * FROM clients WHERE client_code='*' ";
$result = odbc_exec($conn , $sql);
$num_rows = odbc_num_rows($ result);
echo "num of rows :".$num_rows ;
Kindly suggest
i have a code which is used to connect to database and get number of rows affteced from the SQL Query.
when i run the query connecting to postgres DB it gives num_row as 0, but when i run the query connecting to mssql server DB it gives num_row as -1. Below is my code.
$conn = odbc_connect('s erver','usernam e','password');
$sql = "SELECT * FROM clients WHERE client_code='*' ";
$result = odbc_exec($conn , $sql);
$num_rows = odbc_num_rows($ result);
echo "num of rows :".$num_rows ;
Kindly suggest
Comment