J
John Coltrane
I have found that when I use parameters I must prefix the parameter name
with an '?', but I have 2 books that show '@' as the prefix. Is there a
reason for this? I am using C# with Mysql v5.1.
the following snippet works
statement = "select * from limbs where arms = ?arms";
using ( MySqlCommand command = new MySqlCommand(statement, conn) ) {
MySqlParameter param = new MySqlParameter();
param.ParameterName = "?arms";
param.Value = 0;
param.MySqlDbType = MySqlDbType.Int32;
param.Direction = ParameterDirection.Input;
command.Parameters.Add(param);
}
thanks for the help
with an '?', but I have 2 books that show '@' as the prefix. Is there a
reason for this? I am using C# with Mysql v5.1.
the following snippet works
statement = "select * from limbs where arms = ?arms";
using ( MySqlCommand command = new MySqlCommand(statement, conn) ) {
MySqlParameter param = new MySqlParameter();
param.ParameterName = "?arms";
param.Value = 0;
param.MySqlDbType = MySqlDbType.Int32;
param.Direction = ParameterDirection.Input;
command.Parameters.Add(param);
}
thanks for the help