Hello again Mem, Paul ...
'm All afternoon trying to figure out why the code I'm creating is not working on memht.
I've tried all kinds of SELECT as possible but always returns error messages in memht.
The code is as follows:
| code |
<?php
global $dblink;
$result = $dblink->get_list("SELECT *, date_format(date,'%d/%m/%Y') AS date FROM memht_calendar_events ORDER BY date ASC LIMIT 1");
foreach ($result as $row) {
$id = $row['id'];
$data = $row['date'];
$hoje = date("d/m/Y");
$titulo = $row['title'];
}
if($data > $hoje){
echo "<div align='center'>";
echo "<div style='font-size:20px;'><b>Dia <font color='#990000'><blink>$data</blink></font></b></div><p>";
echo "<div style='font-size:14px;'><b>$titulo</b></div></div><p>";
}else{
echo "<div align='center' style='font-size:16px;'><b>Não há Eventos!</b></div><p>";
echo "<div align='center' style='font-size:16px;'><b>Aguarde Novidades!</b></div>";
}
?>
|
This code I'm trying to create for him to catch only the future dates on the calendar of events MemHT, but anything I do, he continues to get older dates ...
For example: I have a record of the day 01/01/2009. Today is 06/09/2009, and have another record of 12/09/2009.
So he should only return me the date of 12.09.2009 as the first, is older than the current ... someone help me with my error? what is missing for that work?
#############################################
Estou a tarde inteira tentando adivinhar o motivo pelo qual o código que estou criando não está funcionando no memht.
Eu já tentei todo o tipo de SELECT possível mas sempre retorna mensagens de erro no memht.
Esse código, estou tentando criar para que ele pegue somente as datas FUTURAS no calendário de Eventos do MemHT, mas qualquer coisa que eu faça, ele continua a pegar datas mais antigas...
Por exemplo: tenho um cadastro do dia 01/01/2009. Hoje são 06/09/2009, e tenho outro cadastro de 12/09/2009.
Então, ele só deveria me retornar a data de 12/09/2009 já que a primeira, é mais antiga que a atual... alguém pode me ajudar com meu erro? o que está faltando pra isso funcionar?