Hi,
In C# I can write a quick function to connect to an SQL server DB and retrieve a value/s like this:
SqlCommand _Command = new SqlCommand("SomeStoredProc", new SqlConnection(_sqlConnectionString));
_Command.CommandType = CommandType.StoredProcedure;
_Command.Parameters.AddWithValue("@Date", DateTime.Today);
_Command.Connection.Open();
SqlDataReader myReader = _Command.ExecuteReader(CommandBehavior.CloseConnection);
if (myReader.HasRows)
{
while (myReader.Read())
{
_Files.Add(myReader["FileName"].ToString());
}
myReader.Close();
}
My question is:
How can I write a function like this in PHP?