SELECT * , count(openid) as count FROM `cul_logindata` GROUP BY `openid` HAVING count>1
SELECT * , count(openid) as count FROM `cul_logindata` GROUP BY `openid` HAVING count>1
update lottery set voucher ='60000';
mysql_fetch_row() 函数从结果集中取得一行作为数字数组。
mysql_insert_id获得mysql查询后的自增主键的id
mysql_fetch_array从mysql_query的执行结果中取出一行 结果放在2个数组中,MYSQL_ASSOC - 关联数组(键名和键值) MYSQL_NUM - 数字数组 MYSQL_BOTH - 默认。同时产生关联和数字数组