Forums

Participants Database
Reset Id number (8 posts)

  1. martinahawkins
    Member
    Posted 3 months ago #

    Is it possible to reset the ID number to 1

    http://wordpress.org/extend/plugins/participants-database/

  2. xnau
    Member
    Posted 3 months ago #

    Hi martinahawkins,

    Yes, at the moment, it requires that you edit the main file...but it will only work if you don't have any records in your database. You'll need to do a fresh install (that means deleting everything!) so it's only a good idea if you don't have any records stored.

    I want to add the ability to reset them (that is, to renumber them from a new starting number) but that's in the future.

  3. martinahawkins
    Member
    Posted 3 months ago #

    Thats great. I only have a few test records in database at minute. Could you please tell me where exactly I can change it. Would be extremely grateful. Thank You. Fantastic Plugin.

  4. martinahawkins
    Member
    Posted 3 months ago #

    I think I found it.
    // record ID numbers begin counting up from this number
    public static $id_base_number = 1325;

    If I reset this to 1 will this be reset to 1325 every time there is an upgrade?

  5. xnau
    Member
    Posted 3 months ago #

    martinahawkins,

    Yes, that the one. But this will only work if you completely delete the database. (or, if you you know your way around PHPMyAdmin, you can change the ID of the default record to whatever your want the initial ID to be)

    The plugin requires that the first record in the main database have the same ID as the base ID number. If you delete the database, it will rebuild it starting with whatever your set that number to be

    Warning: this is untested. There may be other problems. And an upgrade will change it, but you won't have to rebuild the database, just change the $id_base_number again.

  6. martinahawkins
    Member
    Posted 3 months ago #

    thank you for this information

  7. lozbo
    Member
    Posted 2 months ago #

    By completely deleting the database, you mean only the participants_database table, all the tables, or the whole wp installation?

    I have changed the id base number to 1, and changed the id in the table record, but its giving me unexpected results, like if I set the (only) participant record I have to 1, when I go to the signup page it shows the data of that participant. But if I change it to 0, its fine, yet when I submit another entry, it continues from where it left off (1330 or so).

    What do you think?

  8. xnau
    Member
    Posted 2 months ago #

    Lozbo,

    No, don't delete your entire database...just the plugins database. The easiest way to do that is to deactivate it, then click on "delete" and it will delete the files and database for you. Then reinstall the plugin from scratch. Now you can make you mods before you create your first record. Remember the first record is the default record, so it has to be there and it needs to have the same ID number as the number you want to start your count with.

Reply

You must log in to post.

About this Plugin

About this Topic