本文整理匯總了C#中MySql.Data.MySqlClient.MySqlCommand.GetUInt64方法的典型用法代碼示例。如果您正苦於以下問題:C# MySqlCommand.GetUInt64方法的具體用法?C# MySqlCommand.GetUInt64怎麽用?C# MySqlCommand.GetUInt64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MySql.Data.MySqlClient.MySqlCommand
的用法示例。
在下文中一共展示了MySqlCommand.GetUInt64方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: getItem
public static Request getItem()
{
Request r = new Request();
try
{
MySqlDataReader rdr = new MySqlCommand("SELECT `id`,`steam_id`,`type`,`priority` FROM `queue` WHERE `id` IN (SELECT `queue_id` FROM `queue_status` WHERE `active`=1 AND `status`=" + (int)RequestStatus.Waiting + ") ORDER BY `priority` DESC, `id` ASC LIMIT 1", QueueConnection).ExecuteReader();
while (rdr.Read())
{
r.ID = rdr.GetInt32(0);
r.User = rdr.GetUInt64(1);
r.TradeType = (Bot.TradeTypes)rdr.GetInt32(2);
r.Priority = rdr.GetInt32(3);
}
rdr.Close();
r.Data = new string[Int32.Parse((new MySqlCommand("SELECT COUNT(`data`) FROM `queue_items` WHERE `queue_id`=" + r.ID, conn)).ExecuteScalar().ToString())];
rdr = (new MySqlCommand("SELECT `data` FROM `queue_items` WHERE `queue_id`=" + r.ID, conn)).ExecuteReader();
int i = 0;
while (rdr.Read())
r.Data[i++] = rdr.GetString(0);
rdr.Close();
}
catch (Exception e)
{
log.Error("Error getting new request: " + e.Message);
}
return r;
}