Re: Good SVN Deployment Plan for CakePHP
You must be aware in the checkout that the user who own the file is apache if you run a php script. On Oct 26, 3:28 am, frederic bollon wrote: > Hi JeremyL > > You should give try to Fredistrano,http://code.google.com/p/fredistrano/. > > It automates the export of your sources from a subversion repository > and synchronizes them with the content of a target directory. Several > manual tasks are also handled directly by the application during the > deployment: renaming of configuration files, modifying permissions... > > Fred > > On 24 oct, 22:36, JeremyL wrote: > > > Can anyone point me to a good solid SVNdeploymenthowto for CakePHP > > and a live app? Something along the lines of how simple WordpPress > > explains it (http://codex.wordpress.org/Installing/ > > Updating_WordPress_with_Subversion) but of course Cake has some > > additional complications since cake is only a framework and not the > > entire app. > > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@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=en -~--~~~~--~~--~--~---
Re: CakePHP Editor/IDE
I use eclipse-pdt. I add cake like a library and I the IDE provide code completation and phpdoc preview of the selected function or variable. If you want to have code completation for a model in the controller you must declare the variable explicity like $person = new Person(); and comment the line after finish (I never comment this line and I still alive). Sl2 Sergio On Aug 9, 9:05 am, Paolo Portaluri wrote: > Il giorno 06/ago/09, alle ore 22:12, pomares ha scritto: > > > I use Coda. No code autocompletion specific to CakePHP as far as I > > know on any IDE. If there is, I would love to find out about it. > > Look at > this:http://code621.com/content/6/a-collection-of-coda-clips-for-cakephp > > Ciao > Paolo > > -- > Paolo Portaluri > mail: poweru...@work.to.it > web:http://work.to.it/ > AIM: poweruser82 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@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=en -~--~~~~--~~--~--~---
Re: Catching MySQL errors
I catch the error with a "Caveman's method" in cake 1.1 if( $this->Model->save($data)){ if($id == -1) $id = $this->Model->getLastInsertID(); } else { $error_msg = mysql_error(); if(strpos($error_msg, 'Duplicate entry') != -1 ){ // do something } } I think there is a better way using the errno number and, but this is fast solution. -Sergio On Mar 28, 3:57 pm, MattC <[EMAIL PROTECTED]> wrote: > I've tried to catch the duplicate entry error a bunch of times, but > have never had any luck. I would love to see a solution for this. I > realize I can check before trying the save, but if I'm importing some > large amount of data it would cause an extra query for every record. > > As for using IsUnique I don't think it works real well just sticking > it in as a rule in validation. Otherwise won't it fail on updates? > And if you set "on" => "create" won't that allow for duplicate names > on update? I always end up using a custom rule to make sure that 1) > the username doesn't exist and 2) if it does it has the same id as the > data being saved. Maybe I'm missing some Cake magic on this one. > > -Mattwww.pseudocoder.com > > On Mar 28, 11:58 am, Greg Baker <[EMAIL PROTECTED]> wrote: > > > How can I capture a MySQL error like the following: > > > Warning (512): SQL Error: 1062: Duplicate entry > > 'TestSlot-47e9547d-6570-4e3e-9834-16b88699522c' for key 2 [CORE/cake/ > > libs/model/datasources/dbo_source.php, line 459] > > > Basically I have a unique key set across two fields in a table so that > > if I add a 'Slot' which belongsTo a 'Conference' the slot name must be > > unique within that conference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---