Jump to content
Jam

How to change Client ID

Recommended Posts

Is it possible to change the Client ID in WHMCS? 

I want to change the Client ID number into LC002.

1810232726_clientid.thumb.png.4e08f572f4dfc355713e0525bb2dec7e.png

Share this post


Link to post
Share on other sites

No, it's not possible for a million of reasons (query, joins, API, third-party modules etc.).

Share this post


Link to post
Share on other sites
8 hours ago, Jam said:

Is it possible to change the Client ID in WHMCS? 

no - it's going to be an integer field (number only) and its value will be referenced in multiple database tables - so existing values shouldn't be changed .

if they had no services/domains/invoices etc, then potentially you could change the value to another number, but I wouldn't even bother as there is zero gain in doing so and lots of potential pain if you get it wrong.

8 hours ago, Jam said:

I want to change the Client ID number into LC002. 

if the client ID is ever shown in the client area, invoice etc (can't recall if it is or not by default), then those id values could be cosmetically changed with a hook or template tweak..

you could also change the auto increment value (either via a SQL query of phpmyadmin etc) if you want to give the impression that you have more clients, e.g instead of the next client being given #12, you could update the tblclients table so that they're given #2000 or whatever.

Share this post


Link to post
Share on other sites

I have a fresh install of WHMCS. I deleted the first test client and now I am seeing id 2 and id 3.  So my 1 is 2 and 2 is 3 and so forth.  In other words, no way to put in order starting with 1 id.  No problem just checking before I set the affiliate area.  Thanks Stanley

image.thumb.png.db79e43bf2e93e21b5c888b63e37af33.png

Share this post


Link to post
Share on other sites

Most of the time IDs in a database are auto incrementing, and removing one won't remove the ID for a number of reasons. It goes in order, and once it's used, that's that. 

Share this post


Link to post
Share on other sites
15 hours ago, Stanley said:

I have a fresh install of WHMCS. I deleted the first test client and now I am seeing id 2 and id 3.  So my 1 is 2 and 2 is 3 and so forth.  In other words, no way to put in order starting with 1 id.  No problem just checking before I set the affiliate area. 

as @bear says, that would be expected behaviour.

how to reset the database after your initial testing is outlined in the doc below - it would wipe those two existing clients from the database, so you would have to enter their details again... but their IDs would then be 1 & 2 instead of 2 & 3.

https://docs.whmcs.com/Maintenance#Resetting_your_database

Share this post


Link to post
Share on other sites
19 hours ago, bear said:

Most of the time IDs in a database are auto incrementing, and removing one won't remove the ID for a number of reasons. It goes in order, and once it's used, that's that. 

Thank you for your response to my question.  I appreciate the insight. 

Share this post


Link to post
Share on other sites
7 hours ago, brian! said:

as @bear says, that would be expected behaviour.

how to reset the database after your initial testing is outlined in the doc below - it would wipe those two existing clients from the database, so you would have to enter their details again... but their IDs would then be 1 & 2 instead of 2 & 3.

https://docs.whmcs.com/Maintenance#Resetting_your_database

Thank you.  I will go ahead and gives this a shot.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated