Peter Klauer - 2006-09-03 18:22:02 - In reply to message 1 from Brandon Sussman
I always have only one comment per page, but multiple comments per site.
Maybe you have some sort of CMS and it generates articles. Then the $code_for is "articles" (8 chars max!) and $id_for is the id of the article in the database.
Simple, isn't it?
On the same site you have other items which wait to be commented. A linklist? Set $code_for to 'linklist' and $id_for to '1' (or 0).
I hope this answered the question.
Peter Klauer - 2006-09-04 18:15:18 - In reply to message 3 from Jon Ezrin
I never tried this. Since it is possible to have multiple instances of sqltable on one page, it should work with some exclusion.
At the moment, if every comment item on this same page has the same $code_for and only $id_for is changed, there should be some trouble because the sqltables will all together respond to the buttons. Same as steering your neighbours airplane with your remote. You could go around this issue by putting
$comment->sqltable->instance = $code_for.$id_for;
each time before you put "$comment->put();"
($code_for and $id_for are something like 'articles' and '432', where $id_for is the id of the article in the sql table)