遍历库中表的集合,方法很多,我选了几种,都有错误,你帮我看看有什么好的方法? string str_selct = "select " + YMD + " from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mydesin' ; MySqlCommand cmd = new MySqlCommand(str_selct, Con); int result = Convert.ToInt32(cmd.ExecuteScalar()); if (result == 0) { flag = false; } else { flag = true;}mydesin是我的数据库名,YMD是今天的日期,
string str_selct = "select " + YMD + " from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mydesin' ;
MySqlCommand cmd = new MySqlCommand(str_selct, Con); int result = Convert.ToInt32(cmd.ExecuteScalar());
if (result == 0)
{
flag = false; }
else
{
flag = true;}mydesin是我的数据库名,YMD是今天的日期,