Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8068

Re: Reset Auto Increment to lower value

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: Reset Auto Increment to lower value
Date 2013-01-11 15:05 +0100
Message-ID <alakhqF5km6U1@mid.uni-berlin.de> (permalink)
References <97b43e2f-5732-421d-9c6b-19463c9e930e@googlegroups.com> <05757de0-324f-4df3-af9d-2871a2eeb976@ck1g2000vbb.googlegroups.com> <b2348e8c-e235-480c-8db9-c097a3cc854f@googlegroups.com>

Show all headers | View raw


Am 11.01.2013 14:55, schrieb makamo66@gmail.com:
> On Friday, January 11, 2013 5:05:54 AM UTC-5, Captain Paralytic wrote:
>> On Jan 10, 5:55 pm, makam...@gmail.com wrote:
>>
>>> I need to create a tiles table that has a structure like this forhttp://www.myownmealplanner.com:
--cut
>>
>>> I can't just create new tables for new users because I'm using cakephp and that would require new models, views, and controllers for every new table. How do I get the sub_tile_id to auto_increment starting at every new user id? According to the manual I can't restart auto-increment with a lower value than it has already displayed so this needs to be done with php somehow.
>>
>>
>>
>> If you are uaing MySQL then this is the default behaviour:
>>
>> http://stackoverflow.com/questions/3804845/auto-increment-usage-in-composite-key
> 
> This didn't work

what?

> CREATE TABLE `tiles` (  
> 	`sub_tile` ENUM('1','2','3') NOT NULL,
> 	`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,  
> 	`user_id` INT(22)
>  )
> 

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Reset Auto Increment to lower value makamo66@gmail.com - 2013-01-10 09:55 -0800
  Re: Reset Auto Increment to lower value Denis McMahon <denismfmcmahon@gmail.com> - 2013-01-10 20:17 +0000
  Re: Reset Auto Increment to lower value Captain Paralytic <paul_lautman@yahoo.com> - 2013-01-11 02:05 -0800
    Re: Reset Auto Increment to lower value makamo66@gmail.com - 2013-01-11 05:55 -0800
      Re: Reset Auto Increment to lower value "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-01-11 15:05 +0100
      Re: Reset Auto Increment to lower value Captain Paralytic <paul_lautman@yahoo.com> - 2013-01-11 08:18 -0800
      Re: Reset Auto Increment to lower value Luuk <luuk@invalid.lan> - 2013-01-11 20:07 +0100
  Re: Reset Auto Increment to lower value Luuk <luuk@invalid.lan> - 2013-01-11 20:22 +0100
  Re: Reset Auto Increment to lower value makamo66@gmail.com - 2013-01-11 11:37 -0800
    Re: Reset Auto Increment to lower value makamo66@gmail.com - 2013-01-11 11:38 -0800

csiph-web