Dracolas Posted January 15, 2010 Share Posted January 15, 2010 How do you set up the page so that when it inserts into the database it takes the next # in a field. as in when you register a member and there is 2 members the page automatically make that member 3... i know it can be done but i can't find the coding to do it. Thanks Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/ Share on other sites More sharing options...
Buddski Posted January 15, 2010 Share Posted January 15, 2010 You need to make the 'id' field we will call it an auto-increment. Mysql will take care of it then Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995672 Share on other sites More sharing options...
Dracolas Posted January 15, 2010 Author Share Posted January 15, 2010 ok so do i put anything in the coding on the page? Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995673 Share on other sites More sharing options...
Buddski Posted January 15, 2010 Share Posted January 15, 2010 Nope.. Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995677 Share on other sites More sharing options...
Dracolas Posted January 15, 2010 Author Share Posted January 15, 2010 why type do i use? Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995679 Share on other sites More sharing options...
Buddski Posted January 15, 2010 Share Posted January 15, 2010 int and make it primary key. Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995682 Share on other sites More sharing options...
laffin Posted January 15, 2010 Share Posted January 15, 2010 and dont assign it in your query INSERT INTO users SET username='blah',password='bleh'; Link to comment https://forums.phpfreaks.com/topic/188590-using-s-to-differentiate-entries/#findComment-995686 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.