Re: views = "1234..." numbers
Speaking of moot points, it's "moot" not "mute" On Feb 11, 3:09 am, Sam Sherlock wrote: > FWIW the suggestions made by Ryan & Jeremy are better than using the Model > Query method > as you lose out on the cake auto magic with the method > > $this->Video->doIncrement($id); > vs > $this->Video->query('UPDATE fociki_videos' . ' SET views = views + > 1' . ' WHERE id = ' . $video['Video']['id']); > > this point might be mute in this case but its worth knowing; > any how the first option is > > a) less code > b) clearer > c) does not tie your app to using a table name with prefix > > - S > > On 11 February 2011 04:55, chris...@yahoo.com wrote: > > > Thank You Jeremy, > > I got another approch to it... > > here is what works in my case: > > > $this->Video->query('UPDATE fociki_videos' . ' SET views = views + > > 1' . ' WHERE id = ' . $video['Video']['id']); > > > Thank You for Your Help guys,... > > I love you with all my heart... LoL > > > I'm sorry to bother you with all these questions,... I learn on the > > way,... With little or no knowllege of CAKE and PHP I have gone so > > far... Check me out if you what,... and hire me for your next project > > help... LOL Just kidding guys, don't take it siriously... > > > Thank you All !! > > chris > > > On Feb 10, 8:39 pm, Jeremy Burns | Class Outfit > > wrote: > > > Sounds like you need to have a line of code in the controller's view > > method that calls a simple model function: > > > > $this->Model->increment($id); > > > > In the model: > > > > function increment($id) { > > > $this->updateAll(array('Model.view_count' => > > 'Model.view_count+1'), array('Model.id' => $id)); > > > > } > > > > Or you could just call it directly from the view method in the > > controller: > > > > $this->Model->updateAll(array('Model.view_count' => > > 'Model.view_count+1'), array('Model.id' => $id)); > > > > This way, whenever the view method is called (in other words, each time > > the page is rendered) you increment the view_count field by one. > > > > Jeremy Burns > > > Class Outfit > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > On 11 Feb 2011, at 03:31, chris...@yahoo.com wrote: > > > > > Hi Jeremy, > > > > What I'm looking for is to set the data,... say to set field views in > > > > Video table increment by 1 every time page accessed. To set data,... > > > > NOT to retrive. > > > > > Thanks > > > > chris > > > > > On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit > > > > wrote: > > > >> RTFM.http://book.cakephp.org/ > > > > >> Jeremy Burns > > > >> Class Outfit > > > > >> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > >> On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: > > > > >>> Hi Mike, > > > >>> Yes, I know that I have to read from table,... > > > >>> But I don't know how... LOL > > > >>> the code... anyone can help...? > > > > >>> Thanks > > > >>> chris > > > > >>> On Feb 10, 11:59 am, mike karthauser > > wrote: > > > On 10 Feb 2011, at 17:30, "chris...@yahoo.com" > > wrote: > > > > > Hi All, > > > > How u All Doinnn...?! > > > > > Can anyone teach me how to setup views,... so when page is > > > > accessed ... it will set field views="increment numbers" like Video > > > > views=906, Group views=489, etc.. like how many time page has been > > > > accessed. > > > > You won't be doing any counts in the view, rather updating the count > > when the action is called and passing that value to the view. > > > > All you'll need to do is to get a count value from your table and > > then resave it after you have added 1. You may also want to do this as an > > ajax call in JavaScript when you have played say half of the video as then > > it won't be affected if bots hit the page or people refresh loads > > > > > Thanks > > > > chris > > > > > -- > > > > Our newest site for the community: CakePHP Video Tutorialshttp:// > > tv.cakephp.org > > > > Check out the new CakePHP Questions > > sitehttp://ask.cakephp.organdhelpotherswith their CakePHP related > > questions. > > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > > group athttp://groups.google.com/group/cake-php > > > > >>> -- > > > >>> Our newest site for the community: CakePHP Video Tutorialshttp:// > > tv.cakephp.org > > > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > others with their CakePHP related questions. > > > > >>> To unsubscribe from this group, send email to > > > >>> cake-php+unsubscr...@googlegroups.com For more options, visit this > > group athttp://groups.google.com/group/cake-php > > > > > -- > > > > Our newest site for the community: CakePHP Video Tutorialshttp:// > > tv.cakephp.org > > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > others with their CakePHP related questions. > > > > > To unsubscribe from this group, send email to > > > > cake-php+unsu
Re: views = "1234..." numbers
FWIW the suggestions made by Ryan & Jeremy are better than using the Model Query method as you lose out on the cake auto magic with the method $this->Video->doIncrement($id); vs $this->Video->query('UPDATE fociki_videos' . ' SET views = views + 1' . ' WHERE id = ' . $video['Video']['id']); this point might be mute in this case but its worth knowing; any how the first option is a) less code b) clearer c) does not tie your app to using a table name with prefix - S On 11 February 2011 04:55, chris...@yahoo.com wrote: > Thank You Jeremy, > I got another approch to it... > here is what works in my case: > > $this->Video->query('UPDATE fociki_videos' . ' SET views = views + > 1' . ' WHERE id = ' . $video['Video']['id']); > > Thank You for Your Help guys,... > I love you with all my heart... LoL > > I'm sorry to bother you with all these questions,... I learn on the > way,... With little or no knowllege of CAKE and PHP I have gone so > far... Check me out if you what,... and hire me for your next project > help... LOL Just kidding guys, don't take it siriously... > > Thank you All !! > chris > > On Feb 10, 8:39 pm, Jeremy Burns | Class Outfit > wrote: > > Sounds like you need to have a line of code in the controller's view > method that calls a simple model function: > > > > $this->Model->increment($id); > > > > In the model: > > > > function increment($id) { > > $this->updateAll(array('Model.view_count' => > 'Model.view_count+1'), array('Model.id' => $id)); > > > > } > > > > Or you could just call it directly from the view method in the > controller: > > > > $this->Model->updateAll(array('Model.view_count' => > 'Model.view_count+1'), array('Model.id' => $id)); > > > > This way, whenever the view method is called (in other words, each time > the page is rendered) you increment the view_count field by one. > > > > Jeremy Burns > > Class Outfit > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > On 11 Feb 2011, at 03:31, chris...@yahoo.com wrote: > > > > > > > > > > > > > > > > > Hi Jeremy, > > > What I'm looking for is to set the data,... say to set field views in > > > Video table increment by 1 every time page accessed. To set data,... > > > NOT to retrive. > > > > > Thanks > > > chris > > > > > On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit > > > wrote: > > >> RTFM.http://book.cakephp.org/ > > > > >> Jeremy Burns > > >> Class Outfit > > > > >> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > >> On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: > > > > >>> Hi Mike, > > >>> Yes, I know that I have to read from table,... > > >>> But I don't know how... LOL > > >>> the code... anyone can help...? > > > > >>> Thanks > > >>> chris > > > > >>> On Feb 10, 11:59 am, mike karthauser > wrote: > > On 10 Feb 2011, at 17:30, "chris...@yahoo.com" > wrote: > > > > > Hi All, > > > How u All Doinnn...?! > > > > > Can anyone teach me how to setup views,... so when page is > > > accessed ... it will set field views="increment numbers" like Video > > > views=906, Group views=489, etc.. like how many time page has been > > > accessed. > > > > You won't be doing any counts in the view, rather updating the count > when the action is called and passing that value to the view. > > > > All you'll need to do is to get a count value from your table and > then resave it after you have added 1. You may also want to do this as an > ajax call in JavaScript when you have played say half of the video as then > it won't be affected if bots hit the page or people refresh loads > > > > > Thanks > > > chris > > > > > -- > > > Our newest site for the community: CakePHP Video Tutorialshttp:// > tv.cakephp.org > > > Check out the new CakePHP Questions > sitehttp://ask.cakephp.organdhelpothers with their CakePHP related > questions. > > > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > group athttp://groups.google.com/group/cake-php > > > > >>> -- > > >>> Our newest site for the community: CakePHP Video Tutorialshttp:// > tv.cakephp.org > > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > others with their CakePHP related questions. > > > > >>> To unsubscribe from this group, send email to > > >>> cake-php+unsubscr...@googlegroups.com For more options, visit this > group athttp://groups.google.com/group/cake-php > > > > > -- > > > Our newest site for the community: CakePHP Video Tutorialshttp:// > tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > others with their CakePHP related questions. > > > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > group athttp://groups.google.com/group/cake-php > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP
Re: views = "1234..." numbers
Thank You Jeremy, I got another approch to it... here is what works in my case: $this->Video->query('UPDATE fociki_videos' . ' SET views = views + 1' . ' WHERE id = ' . $video['Video']['id']); Thank You for Your Help guys,... I love you with all my heart... LoL I'm sorry to bother you with all these questions,... I learn on the way,... With little or no knowllege of CAKE and PHP I have gone so far... Check me out if you what,... and hire me for your next project help... LOL Just kidding guys, don't take it siriously... Thank you All !! chris On Feb 10, 8:39 pm, Jeremy Burns | Class Outfit wrote: > Sounds like you need to have a line of code in the controller's view method > that calls a simple model function: > > $this->Model->increment($id); > > In the model: > > function increment($id) { > $this->updateAll(array('Model.view_count' => 'Model.view_count+1'), > array('Model.id' => $id)); > > } > > Or you could just call it directly from the view method in the controller: > > $this->Model->updateAll(array('Model.view_count' => 'Model.view_count+1'), > array('Model.id' => $id)); > > This way, whenever the view method is called (in other words, each time the > page is rendered) you increment the view_count field by one. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 11 Feb 2011, at 03:31, chris...@yahoo.com wrote: > > > > > > > > > Hi Jeremy, > > What I'm looking for is to set the data,... say to set field views in > > Video table increment by 1 every time page accessed. To set data,... > > NOT to retrive. > > > Thanks > > chris > > > On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit > > wrote: > >> RTFM.http://book.cakephp.org/ > > >> Jeremy Burns > >> Class Outfit > > >> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > >> On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: > > >>> Hi Mike, > >>> Yes, I know that I have to read from table,... > >>> But I don't know how... LOL > >>> the code... anyone can help...? > > >>> Thanks > >>> chris > > >>> On Feb 10, 11:59 am, mike karthauser wrote: > On 10 Feb 2011, at 17:30, "chris...@yahoo.com" > wrote: > > > Hi All, > > How u All Doinnn...?! > > > Can anyone teach me how to setup views,... so when page is > > accessed ... it will set field views="increment numbers" like Video > > views=906, Group views=489, etc.. like how many time page has been > > accessed. > > You won't be doing any counts in the view, rather updating the count > when the action is called and passing that value to the view. > > All you'll need to do is to get a count value from your table and then > resave it after you have added 1. You may also want to do this as an > ajax call in JavaScript when you have played say half of the video as > then it won't be affected if bots hit the page or people refresh loads > > > Thanks > > chris > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions > > sitehttp://ask.cakephp.organdhelpothers with their CakePHP related > > questions. > > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this > > group athttp://groups.google.com/group/cake-php > > >>> -- > >>> Our newest site for the community: CakePHP Video > >>> Tutorialshttp://tv.cakephp.org > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > >>> others with their CakePHP related questions. > > >>> To unsubscribe from this group, send email to > >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group > >>> athttp://groups.google.com/group/cake-php > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
Sounds like you need to have a line of code in the controller's view method that calls a simple model function: $this->Model->increment($id); In the model: function increment($id) { $this->updateAll(array('Model.view_count' => 'Model.view_count+1'), array('Model.id' => $id)); } Or you could just call it directly from the view method in the controller: $this->Model->updateAll(array('Model.view_count' => 'Model.view_count+1'), array('Model.id' => $id)); This way, whenever the view method is called (in other words, each time the page is rendered) you increment the view_count field by one. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Feb 2011, at 03:31, chris...@yahoo.com wrote: > Hi Jeremy, > What I'm looking for is to set the data,... say to set field views in > Video table increment by 1 every time page accessed. To set data,... > NOT to retrive. > > Thanks > chris > > > > On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit > wrote: >> RTFM.http://book.cakephp.org/ >> >> Jeremy Burns >> Class Outfit >> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com >> >> On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: >> >> >> >> >> >> >> >>> Hi Mike, >>> Yes, I know that I have to read from table,... >>> But I don't know how... LOL >>> the code... anyone can help...? >> >>> Thanks >>> chris >> >>> On Feb 10, 11:59 am, mike karthauser wrote: On 10 Feb 2011, at 17:30, "chris...@yahoo.com" wrote: >> > Hi All, > How u All Doinnn...?! >> > Can anyone teach me how to setup views,... so when page is > accessed ... it will set field views="increment numbers" like Video > views=906, Group views=489, etc.. like how many time page has been > accessed. >> You won't be doing any counts in the view, rather updating the count when the action is called and passing that value to the view. >> All you'll need to do is to get a count value from your table and then resave it after you have added 1. You may also want to do this as an ajax call in JavaScript when you have played say half of the video as then it won't be affected if bots hit the page or people refresh loads >> > Thanks > chris >> > -- > Our newest site for the community: CakePHP Video > Tutorialshttp://tv.cakephp.org > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > others with their CakePHP related questions. >> > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php >> >>> -- >>> Our newest site for the community: CakePHP Video >>> Tutorialshttp://tv.cakephp.org >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help >>> others with their CakePHP related questions. >> >>> To unsubscribe from this group, send email to >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group >>> athttp://groups.google.com/group/cake-php > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
On Feb 10, 2011, at 21:31, chris...@yahoo.com wrote: > On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit wrote: >> RTFM. http://book.cakephp.org/ > > What I'm looking for is to set the data,... say to set field views in > Video table increment by 1 every time page accessed. To set data,... > NOT to retrive. We understand what you're saying. We're suggesting you should do a little reading on your own to try to find the answer. For example, the first Google search result for "cakephp increment" is this, which seems relevant: http://nuts-and-bolts-of-cakephp.com/2008/05/22/incrementing-a-field-in-cakephp/ Even better, perhaps, is the second result of that search: http://bakery.cakephp.org/articles/ketan/2008/05/13/increment-behavior -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
Hi Jeremy, What I'm looking for is to set the data,... say to set field views in Video table increment by 1 every time page accessed. To set data,... NOT to retrive. Thanks chris On Feb 10, 1:11 pm, Jeremy Burns | Class Outfit wrote: > RTFM.http://book.cakephp.org/ > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: > > > > > > > > > Hi Mike, > > Yes, I know that I have to read from table,... > > But I don't know how... LOL > > the code... anyone can help...? > > > Thanks > > chris > > > On Feb 10, 11:59 am, mike karthauser wrote: > >> On 10 Feb 2011, at 17:30, "chris...@yahoo.com" wrote: > > >>> Hi All, > >>> How u All Doinnn...?! > > >>> Can anyone teach me how to setup views,... so when page is > >>> accessed ... it will set field views="increment numbers" like Video > >>> views=906, Group views=489, etc.. like how many time page has been > >>> accessed. > > >> You won't be doing any counts in the view, rather updating the count when > >> the action is called and passing that value to the view. > > >> All you'll need to do is to get a count value from your table and then > >> resave it after you have added 1. You may also want to do this as an ajax > >> call in JavaScript when you have played say half of the video as then it > >> won't be affected if bots hit the page or people refresh loads > > >>> Thanks > >>> chris > > >>> -- > >>> Our newest site for the community: CakePHP Video > >>> Tutorialshttp://tv.cakephp.org > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > >>> others with their CakePHP related questions. > > >>> To unsubscribe from this group, send email to > >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group > >>> athttp://groups.google.com/group/cake-php > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
RTFM. http://book.cakephp.org/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Feb 2011, at 20:57, chris...@yahoo.com wrote: > Hi Mike, > Yes, I know that I have to read from table,... > But I don't know how... LOL > the code... anyone can help...? > > Thanks > chris > > > > On Feb 10, 11:59 am, mike karthauser wrote: >> On 10 Feb 2011, at 17:30, "chris...@yahoo.com" wrote: >> >>> Hi All, >>> How u All Doinnn...?! >> >>> Can anyone teach me how to setup views,... so when page is >>> accessed ... it will set field views="increment numbers" like Video >>> views=906, Group views=489, etc.. like how many time page has been >>> accessed. >> >> You won't be doing any counts in the view, rather updating the count when >> the action is called and passing that value to the view. >> >> All you'll need to do is to get a count value from your table and then >> resave it after you have added 1. You may also want to do this as an ajax >> call in JavaScript when you have played say half of the video as then it >> won't be affected if bots hit the page or people refresh loads >> >> >> >> >> >> >> >>> Thanks >>> chris >> >>> -- >>> Our newest site for the community: CakePHP Video >>> Tutorialshttp://tv.cakephp.org >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help >>> others with their CakePHP related questions. >> >>> To unsubscribe from this group, send email to >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group >>> athttp://groups.google.com/group/cake-php > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
http://book.cakephp.org/view/1017/Retrieving-Your-Data -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/10 chris...@yahoo.com > Hi Mike, > Yes, I know that I have to read from table,... > But I don't know how... LOL > the code... anyone can help...? > > Thanks > chris > > > > On Feb 10, 11:59 am, mike karthauser wrote: > > On 10 Feb 2011, at 17:30, "chris...@yahoo.com" > wrote: > > > > > Hi All, > > > How u All Doinnn...?! > > > > > Can anyone teach me how to setup views,... so when page is > > > accessed ... it will set field views="increment numbers" like Video > > > views=906, Group views=489, etc.. like how many time page has been > > > accessed. > > > > You won't be doing any counts in the view, rather updating the count when > the action is called and passing that value to the view. > > > > All you'll need to do is to get a count value from your table and then > resave it after you have added 1. You may also want to do this as an ajax > call in JavaScript when you have played say half of the video as then it > won't be affected if bots hit the page or people refresh loads > > > > > > > > > > > > > > > > > Thanks > > > chris > > > > > -- > > > Our newest site for the community: CakePHP Video Tutorialshttp:// > tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > others with their CakePHP related questions. > > > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > group athttp://groups.google.com/group/cake-php > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
Hi Mike, Yes, I know that I have to read from table,... But I don't know how... LOL the code... anyone can help...? Thanks chris On Feb 10, 11:59 am, mike karthauser wrote: > On 10 Feb 2011, at 17:30, "chris...@yahoo.com" wrote: > > > Hi All, > > How u All Doinnn...?! > > > Can anyone teach me how to setup views,... so when page is > > accessed ... it will set field views="increment numbers" like Video > > views=906, Group views=489, etc.. like how many time page has been > > accessed. > > You won't be doing any counts in the view, rather updating the count when the > action is called and passing that value to the view. > > All you'll need to do is to get a count value from your table and then resave > it after you have added 1. You may also want to do this as an ajax call in > JavaScript when you have played say half of the video as then it won't be > affected if bots hit the page or people refresh loads > > > > > > > > > Thanks > > chris > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: views = "1234..." numbers
On 10 Feb 2011, at 17:30, "chris...@yahoo.com" wrote: > Hi All, > How u All Doinnn...?! > > Can anyone teach me how to setup views,... so when page is > accessed ... it will set field views="increment numbers" like Video > views=906, Group views=489, etc.. like how many time page has been > accessed. You won't be doing any counts in the view, rather updating the count when the action is called and passing that value to the view. All you'll need to do is to get a count value from your table and then resave it after you have added 1. You may also want to do this as an ajax call in JavaScript when you have played say half of the video as then it won't be affected if bots hit the page or people refresh loads > Thanks > chris > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
views = "1234..." numbers
Hi All, How u All Doinnn...?! Can anyone teach me how to setup views,... so when page is accessed ... it will set field views="increment numbers" like Video views=906, Group views=489, etc.. like how many time page has been accessed. Thanks chris -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php