I am trying to get the maximum item number that matches a specific invoice number
$get_item_number = mysql_query("SELECT MAX (ItemNumber) identifyorder WHERE InvoiceNumber = '$Invoice'");
this is the error I get:
"You have an error in your SQL syntax near '('ItemNumber') identifyorder WHERE InvoiceNumber = '402'' at line 1"
Can anyone tell me what is wrong with my syntax?
Sorry about that, I think I have been on the computer too long. I just realized what was wrong.
$get_item_number = mysql_query("SELECT MAX (ItemNumber) FROM identifyorder WHERE InvoiceNumber = '$Invoice'");
that works fine!!