ここで私は間違っていますか?今年のリマインダの日付(単独で動作する)と、そのタイプがEmailまたはCall(この部分は動作していません)と等しい場合は、そのユーザに引き出しを依頼しています。ありがとうございました!elseif文に条件を追加する
elseif
($_GET['reminder'] == 'thisyear'
&&(isset($_GET['type'])
&& in_array($_GET['type'], array('Email', 'Call'))))
{
$thisyear = date('Y-m-d');
$todotype = $_GET['type'];
$query = "SELECT * FROM contacttodo,contacts WHERE contacttodo.contacts_id = contacts.ID AND YEAR(reminder) = YEAR(CURDATE()) AND contacttodo.type = '".$todotype."' ORDER BY contacttodo.reminder ASC";
}
UPDATE:これは、レコードを返さないと「コール」と「電子メール」
elseif
($_GET['reminder'] == 'thisyear'
&& (isset($_GET['type'])
&& in_array($_GET['type'], array('Email', 'Call'))))
{
$thisyear = date('Y-m-d');
$todotype = $_GET['type'];
$query = "SELECT * FROM contacttodo,contacts WHERE contacttodo.contacts_id = contacts.ID AND YEAR(reminder) = YEAR(CURDATE()) AND contacttodo.type = '".$todotype."' ORDER BY contacttodo.reminder ASC";
}
いいえ、回答や提案はありませんか? – joshua76