Vorrei poter richiamare tutti i dati di una tabella, dove il valore del campo 'data' (formato 'DATE') sia successivo a quello di un altro campo, 'sended' (formato 'DATE').
Io ho proceduto così:
Codice PHP:
    $result mysql_query("SELECT * FROM `email` ORDER BY m_id ASC LIMIT 1");
while (
$row mysql_fetch_array($result)) {
    
$lastsend $row["sended"];
    }    
    
$strMessage "";
            
$result4 mysql_query("SELECT * FROM `feed` ORDER BY feed_id WHERE `data`>'$lastsend'");
            while (
$row4 mysql_fetch_array($result4)) {
                
$strMessage .= $row4["titolo"] . "\n";
}
//segue ... 
però mi dà costantemente questo errore:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/metatad.it/httpdocs/mailtoday.php on line 40
laddove la riga 40 è:
$result4 = mysql_query("SELECT * FROM `feed` ORDER BY feed_id WHERE `data`>'$lastsend'");
Ovviamente, la prima query mi restituisce un valore (lo verifico con un echo ) nel formato corretto (YYYY-MM-DD).
Ho provato a cercare nel forum, ma non trovo soluzioni alternative...
Come posso risolvere?