Re: CAKEPHP Country Region Combobox via AJAX
It seems it works, would you mind sharing the code? On Thu, Nov 19, 2009 at 09:14, NRV wrote: > Hi ALL, > > > I have implemented > > http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add > locally. > > Its working fine at this moment live but on my local machine when I > change the combobox nothing happens. Can anybody help me out with the > same example. > > > Thank you > > -- > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-...@googlegroups.com. > 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?hl=. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Where can I get "The Chaw"?
ouch. I saw that from chaw's google group. Thanks anyway. On Nov 22, 10:25 am, "Larry E. Masters aka PhpNut" wrote: > It never was open sourced. > > -- > /** > * @author Larry E. Masters > * @var string $userName > * @param string $realName > * @returns string aka PhpNut > * @access public > */ > > > > On Sat, Nov 21, 2009 at 8:13 PM, itsnotvalid wrote: > > Just searched a few websites and there is no indication of a git repo. > > Wonder if this project is still open source. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-...@googlegroups.com. > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com > om> > > . > > For more options, visit this group at > >http://groups.google.com/group/cake-php?hl=. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Where can I get "The Chaw"?
It never was open sourced. -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On Sat, Nov 21, 2009 at 8:13 PM, itsnotvalid wrote: > Just searched a few websites and there is no indication of a git repo. > Wonder if this project is still open source. > > -- > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-...@googlegroups.com. > 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?hl=. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Where can I get "The Chaw"?
Just searched a few websites and there is no indication of a git repo. Wonder if this project is still open source. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Tree reorder tweaking
Zoe -- Sorry, I just now saw your reply! You can use $this->Category- >reorder(); just like that to reorder the entire tree from top to bottom... very handy! On Nov 9, 10:19 am, MonkeyGirl wrote: > OK, so using $this->Category->reorder(); reorders all the children of > a given category (in this example), and their children, and so on, but > is there any way to reorder _all_ the categories, including the top > level ones? > > I see now the point about my code not doing anything more than the > original CakePHP code, as either way, nothing's reorganising the top > level categories. Either I'm missing something or that functionality > simply isn't available, is that right? > > It's good to know that it's recursive though, that's great. > > Thanks, > Zoe. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Increment value using CakePHP model functions
Because I didn't know about it! Thank you so much Ma'moon! On Sat, Nov 21, 2009 at 3:31 PM, Ma'moon wrote: > ًWhy you're not using *Increment Behavior* > http://bakery.cakephp.org/articles/view/increment-behavior ?!! > > > On Sat, Nov 21, 2009 at 11:52 AM, Dave wrote: > >> Hehe it is close to on the money. I do appreciate your help. The goal of >> this question was to increment a value with 1 query. You can do this with >> MySQL with a simple query settings field = field + 1. I was just wondering >> if there was a way to do this within the core as usually your fields are >> escaped in cake functions. I have figured out my problem. Thank you >> though. >> >> Dave >> >> >> On Sat, Nov 21, 2009 at 12:39 AM, jburns wrote: >> >>> You are right. >>> >>> Can I ask if you are using recursion and containable? If so, you can >>> be very specific about what tables, records and fields are returned. >>> I'm still fairly new with Cake but have realised that it is a good >>> thing to implement these in AppModel and then I have complete control >>> over data returned within my models and controller functions. It's a >>> bit more work for me, but well worth it in the performance stakes. >>> >>> With recursion set at -1 you will only get records from the current >>> table (in other words, no associated tables). When you want to bring >>> in associations, increase recursive to 0 or more, then use contain to >>> bring in the associations. You can specify fields from those >>> associations too: >>> >>> $this->Post->contain = array( >>>'Author' => array( >>>'fields' => array ('id', 'first_name', 'last_name') >>>) >>> ); >>> >>> In your case, with recursion set at -1 you can call... >>> >>> $this->Post->read(array('title', 'Published'), 1); >>> $this->Post->set(array( >>>'title' => 'New title', >>>'published' => false >>> )); >>> $this->Post->save(); >>> >>> ...and this will only bring back the value of 'title' and 'published' >>> in the record with an id of 1 and nothing else. That has to be right >>> on the money, doesn't it? >>> >>> >>> On Nov 20, 6:44 pm, Dave wrote: >>> > jburns, if you set your debug level to 2 you will see that performs 2 >>> > queries AND gets a bunch of data I don't need about the item... >>> > >>> > grigri that is very helpful to know that updateAll doesn't escape your >>> > arguments. >>> > >>> > I don't need to afterSave currently, but it is good to know I can do it >>> the >>> > second way as well. >>> > >>> > Thank you very much. >>> > >>> > >>> > >>> > On Fri, Nov 20, 2009 at 9:45 AM, grigri >>> wrote: >>> > > It's possible in two ways. >>> > >>> > > First, you've got the `updateAll` function which doesn't escape or >>> > > mess with your arguments: >>> > >>> > > $this->Item->updateAll( >>> > > array('Item.flags' => 'Item.flags + 1'), >>> > > array('Item.id' => 666) >>> > > ); >>> > >>> > > One possible problem with this is that it will not call `afterSave`, >>> > > trigger behaviour methods, etc... because it's not really a save. >>> > > If you need this to work with the rest, the solution is a bit more >>> > > long-winded: >>> > >>> > > $db =& ConnectionManager::getDataSource($this->Item->useDbConfig); >>> > > $this->Item->set('flags', $db->expression('`Item`.`flags`+1')); >>> > > $this->Item->save(); >>> > >>> > > In reality, accessing the datasource and whatnot should be hidden in >>> > > the model, but this shows a bare-bones way of getting it working. >>> > >>> > > hth >>> > > grigri >>> > >>> > > On Nov 20, 12:46 pm, Dave wrote: >>> > > > Hi everybody, >>> > >>> > > > I have a quick question that bugs me each time I run into it in a >>> > > project, >>> > > > and then I promptly forget about it. It is an easy fix, but it is >>> such >>> > > > common functionality that I feel there must be some way to do it >>> within >>> > > > built in functions rather then a custom query. >>> > >>> > > > The issue is incrementing a table field without grabbing the >>> previous >>> > > value, >>> > > > using MySQL's default function `tablefield` = `tablefield` + 1 . >>> > >>> > > > example: >>> > >>> > > > $this->Item->query('UPDATE `items` SET `flags` = `flags`+1 WHERE >>> > > > `items`.`id` = ' . $id); >>> > >>> > > > I have tried pretty much every way I can think of with >>> model->saveField >>> > > to >>> > > > accomplish this through cake, but I can't get it to work. >>> > >>> > > > First I set the id with $this->Item->id = $id >>> > > > After that I have tried >>> > >>> > > > $this->Item->saveField('flags','+1'); >>> > > > $this->Item->saveField('flags',' +1'); >>> > > > $this->Item->saveField('flags', 'flags+1'); >>> > > > $this->Item->saveField('flags', '`flags`+1'); >>> > >>> > > > So... is there a way to do this with 1 query within cake? I like to >>> have >>> > > as >>> > > > few custom queries as possible within my application. >>> > >>> > > > Thanks for any tips, >>> > >>> > > > who knows, if it isn't built in maybe I will be able
Re: Increment value using CakePHP model functions
ًWhy you're not using *Increment Behavior* http://bakery.cakephp.org/articles/view/increment-behavior ?!! On Sat, Nov 21, 2009 at 11:52 AM, Dave wrote: > Hehe it is close to on the money. I do appreciate your help. The goal of > this question was to increment a value with 1 query. You can do this with > MySQL with a simple query settings field = field + 1. I was just wondering > if there was a way to do this within the core as usually your fields are > escaped in cake functions. I have figured out my problem. Thank you > though. > > Dave > > > On Sat, Nov 21, 2009 at 12:39 AM, jburns wrote: > >> You are right. >> >> Can I ask if you are using recursion and containable? If so, you can >> be very specific about what tables, records and fields are returned. >> I'm still fairly new with Cake but have realised that it is a good >> thing to implement these in AppModel and then I have complete control >> over data returned within my models and controller functions. It's a >> bit more work for me, but well worth it in the performance stakes. >> >> With recursion set at -1 you will only get records from the current >> table (in other words, no associated tables). When you want to bring >> in associations, increase recursive to 0 or more, then use contain to >> bring in the associations. You can specify fields from those >> associations too: >> >> $this->Post->contain = array( >>'Author' => array( >>'fields' => array ('id', 'first_name', 'last_name') >>) >> ); >> >> In your case, with recursion set at -1 you can call... >> >> $this->Post->read(array('title', 'Published'), 1); >> $this->Post->set(array( >>'title' => 'New title', >>'published' => false >> )); >> $this->Post->save(); >> >> ...and this will only bring back the value of 'title' and 'published' >> in the record with an id of 1 and nothing else. That has to be right >> on the money, doesn't it? >> >> >> On Nov 20, 6:44 pm, Dave wrote: >> > jburns, if you set your debug level to 2 you will see that performs 2 >> > queries AND gets a bunch of data I don't need about the item... >> > >> > grigri that is very helpful to know that updateAll doesn't escape your >> > arguments. >> > >> > I don't need to afterSave currently, but it is good to know I can do it >> the >> > second way as well. >> > >> > Thank you very much. >> > >> > >> > >> > On Fri, Nov 20, 2009 at 9:45 AM, grigri >> wrote: >> > > It's possible in two ways. >> > >> > > First, you've got the `updateAll` function which doesn't escape or >> > > mess with your arguments: >> > >> > > $this->Item->updateAll( >> > > array('Item.flags' => 'Item.flags + 1'), >> > > array('Item.id' => 666) >> > > ); >> > >> > > One possible problem with this is that it will not call `afterSave`, >> > > trigger behaviour methods, etc... because it's not really a save. >> > > If you need this to work with the rest, the solution is a bit more >> > > long-winded: >> > >> > > $db =& ConnectionManager::getDataSource($this->Item->useDbConfig); >> > > $this->Item->set('flags', $db->expression('`Item`.`flags`+1')); >> > > $this->Item->save(); >> > >> > > In reality, accessing the datasource and whatnot should be hidden in >> > > the model, but this shows a bare-bones way of getting it working. >> > >> > > hth >> > > grigri >> > >> > > On Nov 20, 12:46 pm, Dave wrote: >> > > > Hi everybody, >> > >> > > > I have a quick question that bugs me each time I run into it in a >> > > project, >> > > > and then I promptly forget about it. It is an easy fix, but it is >> such >> > > > common functionality that I feel there must be some way to do it >> within >> > > > built in functions rather then a custom query. >> > >> > > > The issue is incrementing a table field without grabbing the >> previous >> > > value, >> > > > using MySQL's default function `tablefield` = `tablefield` + 1 . >> > >> > > > example: >> > >> > > > $this->Item->query('UPDATE `items` SET `flags` = `flags`+1 WHERE >> > > > `items`.`id` = ' . $id); >> > >> > > > I have tried pretty much every way I can think of with >> model->saveField >> > > to >> > > > accomplish this through cake, but I can't get it to work. >> > >> > > > First I set the id with $this->Item->id = $id >> > > > After that I have tried >> > >> > > > $this->Item->saveField('flags','+1'); >> > > > $this->Item->saveField('flags',' +1'); >> > > > $this->Item->saveField('flags', 'flags+1'); >> > > > $this->Item->saveField('flags', '`flags`+1'); >> > >> > > > So... is there a way to do this with 1 query within cake? I like to >> have >> > > as >> > > > few custom queries as possible within my application. >> > >> > > > Thanks for any tips, >> > >> > > > who knows, if it isn't built in maybe I will be able to make my >> first >> > > > contribution to the Core! >> > >> > > > Dave >> > >> > > -- >> > >> > > You received this message because you are subscribed to the Google >> Groups >> > > "CakePHP" group. >> > > To post to this group, send email to cake
Re: Table join confusion...
whoops. I meant to address that last comment to jakobjp On Nov 20, 11:08 pm, Josh wrote: > @kdubya > > I was curious about recursions past a depth of 2 so I ran some tests > on a data model I'm currently working with. Apparently you can set > recursive as high as you want. In your case you would want $this- > > >recursive = 3 (when writing in the context of your model) > > Be sure to unbind unnecessary model relations! Cake will not onlyjoin > to whatever depth you want, but it will also rejoin domains so you'd > have information repeated in your resulting array (if you don't unbind > the the belongsTo relation going in the other direction). > > If you get your model relations correct, this is a REALLY easy way to > achieve what you are looking for. > > Josh > > On Nov 20, 2:52 pm, Dave wrote: > > > > > Probably because if you follow naming convention cake handles all of the > > necessary joins for you behind the scenes. You should definitely check your > > recursive value as the previous poster mentioned as well as your database > > relationships set in your model. Usually User hasOne Profile I would think, > > so with hasMany you may get quite a few profile results depending on your > > find call. > > > On Fri, Nov 20, 2009 at 8:45 AM, kdubya wrote: > > > Dr. Lobato, > > > > Thank you. I don't know why I didn't find this article on the bakery > > > but it looks just what I need. Your example code is very clear. I'll > > > try it today. > > > > Ken > > > > On Nov 18, 10:51 pm, "Dr. Loboto" wrote: > > > >http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-... > > > > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com > > om> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Increment value using CakePHP model functions
Hehe it is close to on the money. I do appreciate your help. The goal of this question was to increment a value with 1 query. You can do this with MySQL with a simple query settings field = field + 1. I was just wondering if there was a way to do this within the core as usually your fields are escaped in cake functions. I have figured out my problem. Thank you though. Dave On Sat, Nov 21, 2009 at 12:39 AM, jburns wrote: > You are right. > > Can I ask if you are using recursion and containable? If so, you can > be very specific about what tables, records and fields are returned. > I'm still fairly new with Cake but have realised that it is a good > thing to implement these in AppModel and then I have complete control > over data returned within my models and controller functions. It's a > bit more work for me, but well worth it in the performance stakes. > > With recursion set at -1 you will only get records from the current > table (in other words, no associated tables). When you want to bring > in associations, increase recursive to 0 or more, then use contain to > bring in the associations. You can specify fields from those > associations too: > > $this->Post->contain = array( >'Author' => array( >'fields' => array ('id', 'first_name', 'last_name') >) > ); > > In your case, with recursion set at -1 you can call... > > $this->Post->read(array('title', 'Published'), 1); > $this->Post->set(array( >'title' => 'New title', >'published' => false > )); > $this->Post->save(); > > ...and this will only bring back the value of 'title' and 'published' > in the record with an id of 1 and nothing else. That has to be right > on the money, doesn't it? > > > On Nov 20, 6:44 pm, Dave wrote: > > jburns, if you set your debug level to 2 you will see that performs 2 > > queries AND gets a bunch of data I don't need about the item... > > > > grigri that is very helpful to know that updateAll doesn't escape your > > arguments. > > > > I don't need to afterSave currently, but it is good to know I can do it > the > > second way as well. > > > > Thank you very much. > > > > > > > > On Fri, Nov 20, 2009 at 9:45 AM, grigri > wrote: > > > It's possible in two ways. > > > > > First, you've got the `updateAll` function which doesn't escape or > > > mess with your arguments: > > > > > $this->Item->updateAll( > > > array('Item.flags' => 'Item.flags + 1'), > > > array('Item.id' => 666) > > > ); > > > > > One possible problem with this is that it will not call `afterSave`, > > > trigger behaviour methods, etc... because it's not really a save. > > > If you need this to work with the rest, the solution is a bit more > > > long-winded: > > > > > $db =& ConnectionManager::getDataSource($this->Item->useDbConfig); > > > $this->Item->set('flags', $db->expression('`Item`.`flags`+1')); > > > $this->Item->save(); > > > > > In reality, accessing the datasource and whatnot should be hidden in > > > the model, but this shows a bare-bones way of getting it working. > > > > > hth > > > grigri > > > > > On Nov 20, 12:46 pm, Dave wrote: > > > > Hi everybody, > > > > > > I have a quick question that bugs me each time I run into it in a > > > project, > > > > and then I promptly forget about it. It is an easy fix, but it is > such > > > > common functionality that I feel there must be some way to do it > within > > > > built in functions rather then a custom query. > > > > > > The issue is incrementing a table field without grabbing the previous > > > value, > > > > using MySQL's default function `tablefield` = `tablefield` + 1 . > > > > > > example: > > > > > > $this->Item->query('UPDATE `items` SET `flags` = `flags`+1 WHERE > > > > `items`.`id` = ' . $id); > > > > > > I have tried pretty much every way I can think of with > model->saveField > > > to > > > > accomplish this through cake, but I can't get it to work. > > > > > > First I set the id with $this->Item->id = $id > > > > After that I have tried > > > > > > $this->Item->saveField('flags','+1'); > > > > $this->Item->saveField('flags',' +1'); > > > > $this->Item->saveField('flags', 'flags+1'); > > > > $this->Item->saveField('flags', '`flags`+1'); > > > > > > So... is there a way to do this with 1 query within cake? I like to > have > > > as > > > > few custom queries as possible within my application. > > > > > > Thanks for any tips, > > > > > > who knows, if it isn't built in maybe I will be able to make my first > > > > contribution to the Core! > > > > > > Dave > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-...@googlegroups.com. > > > 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?hl=. > > -- > > You received this message because you are subscribed to the Google Groups >
Re: Dealing with large amounts of data, reading and writing
Hi Carl, I have similar problem to your with massive mailing list where every mail have to be send with some personalized data. The solutions which works great was to write an small javascript and using ajax calls php to send mails divided in portions (20 mails per ajax call) so i've never execute php script more than 5-6 seconds (In your case you can export your xml data in parts and append it to file every ajax call). I hope this give you some clue how to try to solve your problem. Best Regards, Quess On Nov 20, 9:51 pm, carl67lp wrote: > I have a database of board games; its data is based on the XML feed > from: > > http://boardgamegeek.com/xmlapi/boardgame/1,2,3&stats=1 > > Presently it has more than 50,000 game entries, along with associated > publisher, artists, designers, and so forth. In other words--a > massive amount of information. > > Everything is structured fairly well with proper model associations, I > think, so it's a fairly trivial task to pull the data out of the MySQL > database. The issue is that the resulting data array is huge...and I'm > running out of memory. > > I can sometimes handle this by pulling 1000 records at a time, say, > but then I run into my next issue. To actually do all the reading and > writing to XML (via the SimpleXML class), I'd say it takes around 4 or > 5 minutes. On my local environment, I can change the maximum > execution time to be limitless, so it's not a huge issue. But on my > Web host, though, that's not such an easy task--I'm not even sure it > can be done. > > So, it gets to the main question: What's the best way to handle > processing of tens of thousands of records, reading them from a MySQL > database then writing them out via XML? (Incidentally, the XML file > that gets written is some 800MB in size!) > > Any and all suggestions are most welcome. > > --Carl -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
Re: Javascript libraries with images/css inside Cake Plugins
Nope, no solution yet.. For now I'm just putting all my image/flash dependent libraries in /webroot/js where they can be reached, a bit of a chore in truth.. Let's just hope some cake-dev out there hears our cries ;-). On Nov 17, 6:10 pm, haimke wrote: > Hi, did you find any solution to this problem ? > It seems like a bug in CakePHP -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.
hot
kiss pics http://allvideossee.blogspot.com/2009/10/kiss-pics.html kiss kiss http://allvideossee.blogspot.com/2009/10/kiss-kiss.html hot pics http://allvideossee.blogspot.com/2009/10/hot-pics.html spicy pics http://allvideossee.blogspot.com/2009/10/spicy-pics.html hot hot http://allvideossee.blogspot.com/2009/10/hot-hot.html sexy pics http://allvideossee.blogspot.com/2009/10/sexy-pics.html hot boobs pics http://allvideossee.blogspot.com/2009/10/hot-boobs-pics.html hot navel pics http://allvideossee.blogspot.com/2009/10/hot-navel-pics.html half saree hot http://allvideossee.blogspot.com/2009/10/half-saree-hot.html -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. 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?hl=.