/** * 招待IDの取得 * * @accsess public * @return $invitation_id */ public function searchInvitationId($login_id) { try { $sql = "SELECT\n invitation_id\n FROM \n data_users \n WHERE \n login_id='" . $login_id . "' LIMIT 1;"; if (!($result = mysql_query($sql, $this->getDatabaseLink()))) { throw new Exception(mysql_error()); } $row = mysql_fetch_assoc($result); return $row['invitation_id']; } catch (Exception $e) { CreateLog::putErrorLog(get_class() . " " . $e->getMessage()); return false; } }
<?php require_once dirname(__FILE__) . '/../conf/ini.php'; $obj = new Tally(); // $term = " created >= '2013-07-26' AND created < '2013-07-27' "; $term = " created < date(current_timestamp + interval 1 day) AND created >= date(now()) "; $message = $obj->contributionSNS($term); CreateLog::putTweetCntLog($message);