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 #180138 is a reply to message #180127] Fri, 11 January 2013 19:37 Go to previous messageGo to previous message
makamo66 is currently offline  makamo66
Messages: 4
Registered: January 2013
Karma:
Junior Member
I was asked at another forum why I want a sub_tile_id and this is my explanation. I'd like to know if it is even really necessary after all.
The jquery at http://myownmealplanner.com/mealplans/add contains the following code (see the view source):

for (var i=1;i<100;i++){
$( "#draggable" + i ).draggable();
}

Each draggable div uses the primary key of the tiles table to create its own name, for example draggable1, draggable2,..., and on up to draggable100. The tile id (primary key) gives the draggable div its name and I am looping through 100 of these. If I have five users who each have 20 meal tiles then I have already exhausted all of the names available at 100 (5 times 20 being 100). Of course I could just loop over 200 meal tiles instead, keep adding users and keep looping over ever more meal tiles but it seems like a bad idea. Wouldn't the jquery slow down quite a bit if I loop through for example 500 tiles? If instead each user has his own set of meal tiles then I would grab the user id and the sub_tile_id so it would never be more than maybe 10 or 20 to loop through.
[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: Sun Nov 10 05:44:45 GMT 2024

Total time taken to generate the page: 0.07271 seconds