I have two simple function in PHP that I want to convert to C# -
function Doit($enc_user_name, $enc_password)
{
$result = $mysqli->query("call
sp_userAuth('$enc_user_name','$enc_password')");
if (mysqli_num_rows($result) != 0)
{
$data = $result->fetch_array(MYSQLI_BOTH);
return $data;
}
return null;
}
function JustDoit($user_id, $session_id)
{
$result = $mysqli->query("call
sp_userMultiLogin('$user_id', $seesion_id)");
if (mysqli_num_rows($result) != 0)
{
$row = $result->fetch_array(MYSQLI_BOTH);
return $row['session_id'];
}
return null ;
}
Can anyone show me how I may port them to C#?. I am using the OleDbData
Provider to access the MySQL database. The examples you provide are
really to help me no how to :
1). Pass parameters to a stored procedure (in the PHP code above, all
parameters are strings - apart from user_id, which maps to a C# uint)
2). Return a dataset back to C#
3). Return the value for a specific column back to C#