For this piece of code:
Code: Select all
$query5 = 'SELECT * FROM CommissionTermPayments WHERE CustomerID='.$row2['CustomerID'].' AND CommissionTermID='.$row4['CommissionTermID'];
$myresult5 = mysql_fetch_array( $query5 );
if(!$myresult5)
{
do_html_message('Error: Could not perform MySQL query - '.mysql_error());
do_html_footer();
exit();
}Code: Select all
Warning: Supplied argument is not a valid MySQL result resource in /home/XXXX/public_html/sales.php on line 102I've never had this problem before and this doesn't seem to work this time. It would be best to understand the underlying cause.
Can anyone elaborate on why it is doing this?
Many thanks
Mark