Jump to content

Recommended Posts

I have check printing software and need to print a check number for each row in mysql database which shouldn't be too difficult but each pay period the checks go out and the number needs to increment by one....each row should also be using a unique number i've tried to do it a bunch of diffrent ways but always come up short........I'm using php could sombody help me write a nice check numbering system.I'd be entirely grateful.

Link to comment
https://forums.phpfreaks.com/topic/184832-mysql-check-numbering-system-help/
Share on other sites

I don't know what its based on I'm just looking for somebody with an idea on how to write a check numbering system in a mysql database.....you see i query all the users names and the financial data outputs to a csv file each entry in the database needs a uinque in sequence number....this is not an easy thing to dynamically create. any help would be greatly appriciated.

auto increment isn't possible becasue username is the primary key because it must not have duplicates I'm looking to build a system similar to auto increment without using auto increment.....auto increment doesn't even solve my issue because you can't increment auto increment after its set.

auto increment isn't possible becasue username is the primary key because it must not have duplicates I'm looking to build a system similar to auto increment without using auto increment.....auto increment doesn't even solve my issue because you can't increment auto increment after its set.

 

You do not need to make username the primary key.  You can simply set it to have a unique constraint, or define a unique index on username.  You can then add a column called "id" or "checknumber" and define that to be the primary key/ with auto_increment.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.