persis Posted September 15, 2021 Share Posted September 15, 2021 (edited) Hello every one this code not work with updateclientdomain.php (v8.2.1) but worked with updateclientdomain.php(v8.1.2) updateclientdomain.php in Version:8.2.1 (8.2.1-release.1) not work updateclientdomain.php in Version:8.1.3 (8.1.3-release.1) working https://developers.whmcs.com/api-reference/updateclientdomain/ This code update client domains with Domain pricing every day by cron(very helpful) <?php use WHMCS\Database\Capsule; add_hook('AfterCronJob', 1, function($vars) { $adminUsername = ''; // Optional for WHMCS 7.2 and later foreach (Capsule::table('tbldomains')->pluck('id') as $v) { localAPI('UpdateClientDomain', array('domainid' => $v, 'autorecalc' => true), $adminUsername); } }); can any body help me to resolve this problem? updateclientdomain(v8.2.1).php updateclientdomain (v8.1.3).php Edited September 15, 2021 by persis 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 18, 2021 Author Share Posted September 18, 2021 Array( [result] => error [message] => SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where `id` = ?' at line 1 (SQL: update `tbldomains` set where `id` = 3)) 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted September 18, 2021 WHMCS Technical Analyst II Share Posted September 18, 2021 Hi @persis Thanks for your post! The issue you report has been resolved in version 8.3 of WHMCS: https://docs.whmcs.com/Changelog:WHMCS_V8.3.0_Beta_1 Quote CORE-16847 - Prevent erroneous SQL error when there is no change regarding autocalc request to UpdateClientDomain Once version 8.3 reaches stable release tier, updating to it will resolve this. 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 18, 2021 Author Share Posted September 18, 2021 Many Thanks 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.