FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Reset Auto Increment to lower value
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Reset Auto Increment to lower value [message #180134 is a reply to message #180133] Fri, 11 January 2013 14:05 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 11.01.2013 14:55, schrieb makamo66(at)gmail(dot)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-composit e-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)
> )
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php unit testing - how to find the right person
Next Topic: Anyone have experience with any php debuggers?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 00:53:32 GMT 2024

Total time taken to generate the page: 0.03847 seconds