So I have a site for dealing with proprietary issues for my business. Coded it years ago as a website, due to folks working for me from home. Now my servers are forced into the new PHP update, 7.4 I think, and I'm getting this rather vague error:
Fatal error: Error executing query: SELECT ca.customer_id, aa.needs_checking, c.agent_id FROM customer_accounts ca, allowed_accounts aa, customers c WHERE aa.allowed_acct_id = ca.account_type AND c.customer_id = ca.customer_id AND ca.is_active =1 AND ca.mail_interval !=0 AND ca.next_check < UNIX_TIMESTAMP() AND aa.needs_checking=1 AND c.word_balance > 150 AND c.agent_id= - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 in /home/customer/www/i-scribes.com/public_html/mysqldb.class.php on line 270
For this line of code:
$sql = "SELECT ca.customer_id, aa.needs_checking, c.agent_id FROM customer_accounts ca, allowed_accounts aa, customers c WHERE aa.allowed_acct_id = ca.account_type "
. "AND c.customer_id = ca.customer_id AND ca.is_active =1 AND ca.mail_interval !=0 AND ca.next_check < UNIX_TIMESTAMP() AND aa.needs_checking=1 AND c.word_balance > 150 AND "
. "c.agent_id={$_SESSION['staff_id']}";
$db->executeQuery($sql);
If anyone can help, it would be most appreciated! <3