i have the following MySQL-Query:
$sql = "SELECT `eid` FROM `"._ST_EVENT."` WHERE `tid` = ".$tid." AND DATE(`zeitpunkt`) >= CURDATE() ORDER BY `zeitpunkt` ASC;";
The variable $tid could be NULL, but should be interpreted as '0'. Is it possible to do this directly in the mysql-query or should i have a if-clause like this before executing the query?
if ($tid == NULL) {
$tid = 0;
}
Thanks!