asterisk2billing.org
http://forum.asterisk2billing.org/

how to reset Card id?
http://forum.asterisk2billing.org/viewtopic.php?f=21&t=8399
Page 1 of 1

Author:  khaliltelecoms [ Mon Dec 06, 2010 2:18 pm ]
Post subject:  how to reset Card id?

Hi,

i want to reset card id, all cards has been used and i want to start from the begining again. currently the last id is 48788 and want to reset it 1.
Can any body please help me how to do this.

Any help will be highly appreciated.

Thanks
Mohammed

Author:  RobinA [ Mon Dec 06, 2010 8:50 pm ]
Post subject:  Re: how to reset Card id?

Mohammed,

Backup your database before trying anything you're not very familiar with.
If you are familiar with mySQL it shouldn't be too difficult.
I'm not very clear as to how you want to achieve this.
If you are going to empty the table and insert new records, you could use this from the command line after logging in to mysql and selecting the database to use.

Code:
mysql -u root -prootpasswd (change rootpasswd to your mysqlroot password)
use mya2billing;
TRUNCATE TABLE cc_card;

This would wipe out the data then reset the auto card id back to start at 1.
When finished,
quit;

Backup your database before trying anything you're not very familiar with.

Author:  khaliltelecoms [ Sun Dec 19, 2010 2:55 pm ]
Post subject:  Re: how to reset Card id?

Thank you ver much it was really helpful

Thanks,

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/