Hi...
I am trying to update a field with non-english characters, in debug mode i check querry and it's fine when I try to run it on phpmyadmin but it doesn't work here... it doesn't throw an exception but it doesn't update the field either
here is my code... what should I do to solve this ?
public static void updateCastDetail(int castId, movieCast mvCast)
{
using (MySqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
MySqlCommand command = connection.CreateCommand();
string mySqlBday = mvCast.bday.Year + "-" + mvCast.bday.Month + "-" + mvCast.bday.Day;
command.CommandText = "UPDATE mv_cast set name = '" + mvCast.name.Replace("'", "''") + "', location = '" + mvCast.location.Replace("'", "''") + "', bday = '" + mySqlBday + "' where id = '" + castId + "'";
command.ExecuteNonQuery();
}
}
I am trying to update a field with non-english characters, in debug mode i check querry and it's fine when I try to run it on phpmyadmin but it doesn't work here... it doesn't throw an exception but it doesn't update the field either
here is my code... what should I do to solve this ?
public static void updateCastDetail(int castId, movieCast mvCast)
{
using (MySqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
MySqlCommand command = connection.CreateCommand();
string mySqlBday = mvCast.bday.Year + "-" + mvCast.bday.Month + "-" + mvCast.bday.Day;
command.CommandText = "UPDATE mv_cast set name = '" + mvCast.name.Replace("'", "''") + "', location = '" + mvCast.location.Replace("'", "''") + "', bday = '" + mySqlBday + "' where id = '" + castId + "'";
command.ExecuteNonQuery();
}
}