The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Is there a way to do this and to also have the zeros show in the front? thanks.

You can use this as insert statement ( if Proj_num also is a numeric field, integer)
insert into project(proj_num,proj_name) values((select max(id)+1 from project),'projectname');
But why would you like to increment to fields with the same value?
for the zeroes in front, that's more a manner of representation,
you need to use a string formatting function like
SELECT LPAD(id,4,'0') from project
which ads up to 4 zeroes to the id field..
see also http://dev.mysql.com/doc/mysql/en/string-functions.html
greets,
jr≥

Thanks, I think that will help. I want to auto-increment another field that has a different value from the ID. Right now we have projects that are organized by number. The last one was 0023. I want to set up the database so it starts at 0023 and then autoincrements from there, 0024, 0025, etc. whenever we add a new project.