- // Does the user already have this earning?
- $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS `cnt` FROM `{?_MYSQL_PREFIX?}_user_earning` WHERE `earning_id`=%s AND `earning_userid`=%s LIMIT 1",
- array(
- bigintval($earningId),
- getMemberId()
- ), __FUNCTION__, __LINE__);
-
- // Get the count
- list($count) = SQL_FETCHROW($result);
-