Hi guys
I am trying to search fror a name in a table. Ho do I identify if it exists. Presently the cursor returns a value of -1 wether the name exists or not
My code is
cnx = odbc_connect( "agent", "", "" );
if( ! $cnx ) {
Error_handler( "Error in odbc_connect" , $cnx );
}
echo "$msg \n";
odbc_close( $cnx);
exit();
}
{ $sql = "select * from members_table where name = 'david'";
$cur = odbc_exec( $cnx, $sql);
if(odbc_num_rows($cur)<=0) {
//return;
//Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx );
}
$nombreligne = odbc_num_rows($cur);