diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 358d1ad3..da635568 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -393,9 +393,9 @@ class TempToolsController extends BaseController { 'dbname' => $mysql_conf['database'], )); } - $heroContractAddress = HERO_CONTRACT_ADDRESS; + $heroContractAddress = '\"' . HERO_CONTRACT_ADDRESS . '\"'; if ($type == 0) { - $sql = "select lock_to, count(idx) as lock_count from t_nft_lock_event where createtime>=$beginTime and createtime<=$endTime and JSON_EXTRACT(convert(return_values using utf8), '$.nft')='\"$heroContractAddress\"' group by lock_to;"; + $sql = "select lock_to, count(idx) as lock_count from t_nft_lock_event where createtime>=$beginTime and createtime<=$endTime and lower(JSON_EXTRACT(convert(return_values using utf8), '$.nft'))='$heroContractAddress' group by lock_to;"; } else { $sql = "select lock_to, count(idx) as lock_count from t_nft_lock_event where createtime>=$beginTime and createtime<=$endTime group by lock_to;"; }