kempons 0 Report post Posted September 21 Hi, I have the following custom code in my index.php file which is working fine. $query = "SELECT count(id) as pcount FROM $people_table $wherestr"; $result = tng_query($query) or die ("$text[cannotexecutequery]: $query"); $row = tng_fetch_assoc( $result ); $totalpeople = number_format ($row[pcount]); tng_free_result($result); $query = "SELECT DATE_FORMAT(lastimportdate,\"%e %b %Y\") as lastimportdate2 FROM $trees_table"; $result = tng_query($query) or die ($text['cannotexecutequery'] . ": $query"); $treerow = tng_fetch_array( $result, MYSQL_ASSOC ); $lastimportdate = $treerow['lastimportdate2']; When updating to php v7.2, it throws the following errors. Can anyone assist in advising the update required to remove these errors? PHP Warning: Use of undefined constant pcount - assumed 'pcount' (this will throw an Error in a future version of PHP) in /home/kempfamily/public_html/templates/template8/index.php on line 5 PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /home/kempfamily/public_html/templates/template8/index.php on line 19 Thanks. Share this post Link to post Share on other sites
Newfloridian 0 Report post Posted September 21 The warning is telling you that you need to enclose your variable names in single quotes ('pcount' for pcount etc). Have a look at the lines in your .template8/index.php file indicated in the warning message and add the single quotes where indicated Alan Share this post Link to post Share on other sites
kempons 0 Report post Posted September 23 Thanks Alan Share this post Link to post Share on other sites