I think I've been looking at this too long.
I'm trying to format a stored date in mysql.
Here's the statement:
$invoice=mysql_query("SELECT date_format(invoicedate,%M %D %Y) AS date FROM distributorinvoice WHERE invoicenumber='$invnumber'");
if ($row=mysql_fetch_array($invoice)) {
$invdate=$row["date"];
}
I keep getting
Warning: Supplied argument is not a valid MySQL result resource in /var/www2/public_html/adminreports/distrib
utormain.php on line 845
The field names, the table, and the variable $invnumber are all correctly spelled and exist. So what am I missing?