Select Last Record From Database
Dear All, Current I want to generate invoice number like INV1 and so I would like to get the last value of filed no (stand for invoice number) in order to generator one increment when we create a new invoice. I am looking forward to hearing from you as soon as possible. Best Regard, Mr. Manager, -- 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: Concurrent login issue: Users being logged out
But is this happening from specific computers? As eluded to in my last reply, this happens from my computers and those of two agencies and also their clients. As such, the chances of all our computers having some strange config which is causing this are too small to consider. And are these multiple people logged in as the same user? From OP: This does not have to be two people using the same account, simply having two authorised users looking through the site ... As for logging, it depends on the RDMS you're using. Search for query log. I'm not sure what database logs are going to tell me about why a session is timing out, or Auth is unauthorising a user. BTW, does this occur when using regular file sessions? Also from OP: I am using Auth with Database Sessions Thanks for your time, Paul. -- 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: Select Last Record From Database
I think that's a risky strategy. If you start to create an invoice or if a save fails, you could use up an auto-incremented id - so the invoice number might not match the id. That might not be important, of course. I suggest doing it after save; check to see if the invoice number field is empty - if it is, create it and save again. The afterSave will fire again but this time the invoice number will be there. Or (probably a better solution) just use the actual id of the row but use a helper to format it. Jeremy Burns Class Outfit http://www.classoutfit.com On 3 Aug 2012, at 07:02:15, Mr. Manager lyda...@gmail.com wrote: Dear All, Current I want to generate invoice number like INV1 and so I would like to get the last value of filed no (stand for invoice number) in order to generator one increment when we create a new invoice. I am looking forward to hearing from you as soon as possible. Best Regard, Mr. Manager, -- 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
pagination with lat lng
morning, i have a problem with cakephp 1.3: $this-paginate['fields'] = id, $sql_for_distance as distance; $data = $this-paginate('Item', array('distance 50' )); I got mysql error: field distance not exists. Anyone got the same error? Solution? Thanks in advance -- 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: pagination with lat lng
$sql_for_distance is the classic function to calculate distance with latlng -- 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: stored procedures cakephp
The best place would be in a separate function in the applicable Model. To wrap the procedure call in a transaction do something like: For example if you have a calcUserRep() procedure you should do: public function getUserRep($someParam,$someOtherParam){ .. $this-begin(); $this-query(CALL calcUserRep();); $result = $this-query(SELECT something); $this-commit(); } On Thursday, 2 August 2012 13:27:57 UTC+3, Milina Udara wrote: I found that we can use SP with Cakephp. But there are thing call transaction, DataSource, behaviors and Events System. My problem is where to use those things and SP ? I wont answer from architectural view. -- 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
Cakephp 2.x best practice when adding/editing content?
Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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: find with complex conditions (AND and OR)
You may have already realized but: The AND array key is not necessary. If you define the same key twice in php - you overwrite the same value I.e. debug(array('AND' = array('Equipment.company_id' = $this-passedArgs['company'], 'Equipment.deleted' = 0,), 'OR' = array('Equipment.location_id' = null, 'Equipment.location_id' = -1, 'Equipment.location_id' = -2; Has nothing to OR - there's only one thing in that array. From the docs By default, CakePHP joins multiple conditions with boolean AND; Therefore you don't actually need this: 'AND' = array( - So your final conditions should look like this: array( 'Equipment.company_id' = $this-passedArgs['company'], 'Equipment.deleted' = 0, 'OR' = array( array('Equipment.location_id' = null), array('Equipment.location_id' = -1 ), array('Equipment.location_id' = -2) ) ) OR array( 'Equipment.company_id' = $this-passedArgs['company'], 'Equipment.deleted' = 0, 'OR' = array( array('Equipment.location_id' = null), array('Equipment.location_id' = array(-1, -2) ) ) ) AD -- 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: link database tables that are not matched to a model
On Thursday, 2 August 2012 22:21:59 UTC+2, Chris Bull wrote: Not really sure - I'm pretty new to cake, but i've used php for a while. Doesevery database table require a model for you to access the information? Assume yes and your problems will disappear. There is not a lot of tutorials around that I can find for cake v2. Considering cake v3 is inthe works now I hope people release more tutorials. I don't think a tutorial is going to help you on this, The concept of a model in cake hasn't changed since it was first released - and models are well documented already (in addition to the huge quantity of google results). AD -- 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: Adding a fixtures causes infinite error
A bit less portable and slow but I have a separate Fixtures DB with a known set of data and all my fixtures are just a single line public $import = array('model' = 'Client', 'records' = true, 'connection' = 'fixture'); HTH Tarique On Fri, Aug 3, 2012 at 11:14 AM, Jeremy Burns jeremybu...@classoutfit.com wrote: To my shame, I haven't done much with testing but have taken the plunge and am adopting it for all future projects, starting now. -- = PHP for E-Biz: http://sanisoft.com = -- 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: pagination with lat lng
I think you can already use virtualFields for cake1.3 http://book.cakephp.org/1.3/view/1608/Virtual-fields then it will work Am Freitag, 3. August 2012 09:28:56 UTC+2 schrieb lorenzoshake: $sql_for_distance is the classic function to calculate distance with latlng -- 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: Proper MVC location for a function and its call
cricket: A. That was it. So, it makes sense doesn't it, that when you're in the model you do not need to reference the model, so $this-getPath(...) is enough. So, in MVC terminology, I'm using the model to retrieve the data. re: Set, although I had read about it, I also was not getting the significance of set to the MVC pattern. I assume that is the main reason, for instance, that I would not be calling a function FROM the view: it's more like the Model and Controller are pushing (I'm sure there's a better word) the data to the view. Now, in my case, the $id value for a particular topic is available in the view or edit action, but not in the index or add action. So you've really helped me with making the level variable available to the view or edit action. What if, however, for the index page, I had the $id available, but only via a request param. Would that be a case where set would not work and I would have to somehow call the getLevel function right from the view? A. I guess I do have $id available, in the index action, via $id = $this-request-params['named']['id']; Then I could go ahead and use $this-set('level', $this-TopicTree-getLevel($id)); Does that make sense? I'll have to try that! As you can see, I'm trying to get my head around MVC patterns, how they play out on the practical level. Thank you, cricket and others, so very much, for helping me to do this! Kevin -- 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: Cakephp 2.x best practice when adding/editing content?
i use a single method, add/edit even if is user or admin, the difference between add/edit is that on edit you have the ID set, or in parameter or in $this-data admin_editpost($id = null){ if(is_null($id){ //something } } i guess you understand vineri, 3 august 2012, 11:41:01 UTC+3, MetZ a scris: Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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
send mails
Hi to all, I am Struggled one thing, how to send email in cakephp 2.0.3 from localhost(wamp).if anyone known dat please help me. Thanks, Rajakumar. -- 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
send emails
hi all, I am struggled one thing if any one know please help me. -- 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
paypal returning link not working
hello does anyone know why paypal returning link not working after payment?? regards ecom -- View this message in context: http://cakephp.1045679.n5.nabble.com/paypal-returning-link-not-working-tp5710100.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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: Excel Reader component
it read only .xls file not .xlsx file what to do for xlsx -- 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
Can anybody help me with this postLink() delete?
* What I did* *1.- This is my model:* * -- * pre class Account extends AppModel { public $name = 'Account'; public $belongsTo = array( 'Client' = array( 'className' = 'Client', 'foreignKey' = 'client_id' ), 'Accounttype' = array( 'className' = 'Accounttype', 'foreignKey' = 'accounttype_id' ) ); public $hasMany = array( 'Event' = array( 'className' = 'Event', 'foreignKey' = 'account_id', 'dependent'= true ), 'Plot' = array( 'className' = 'Plot', 'foreignKey' = 'account_id', 'dependent'= true ), 'Widget' = array( 'className' = 'Widget', 'foreignKey' = 'account_id', 'dependent'= true ) ); } /pre * -- * * * *2.- **This is my controller:*** * -- * pre class AccountsController extends AppController { public $helpers = array ('Html','Form'); function index($client_id) { $this-set('accounts', $this-Account-find('all', array('recursive' =1, 'conditions' = 'Account.client_id ='. $client_id))); $this-set('client_id', $client_id); } public function view($id = null) { $this-Account-id = $id; $this-set('account', $this-Account-read()); } public function add($client_id) { if ($this-request-is('post')) { if ($this-Account-save($this-request-data)) { $this-Session-setFlash('Your account has been added.'); if($this-request-data['Account']['accounttype_id'] == 2){ $this-redirect(array('controller' = 'twitteraccounts', 'action' = 'connect')); } } } $accounts = $this-Account-find('list'); $accounttype = $this-Account-Accounttype-find('list', array('fields' = array('Accounttype.id', 'Accounttype.description'))); $this-set('client_id', $client_id); $this-set('accounts', $accounts); $this-set('accounttype', $accounttype); } function edit($id = null, $client_id) { $this-Account-id = $id; $this-set('id', $id); if ($this-request-is('get')) { $this-request-data = $this-Account-read(); } else { if ($this-Account-save($this-request-data)) { $this-Session-setFlash('Your account has been updated.'); $this-redirect(array('action' = 'index', $client_id)); } } $accounts = $this-Account-find('list'); $accounttype = $this-Account-Accounttype-find('list', array('fields' = array('Accounttype.id', 'Accounttype.description'))); $this-set('accounts', $accounts); $this-set('accounttype', $accounttype); $this-set('client_id', $client_id); } public function delete($id, $client_id) { $id = $this-request-params['pass'][0]; //the request must be a post request //that's why we use postLink method on our view for deleting user if( $this-request-is('get') ){ $this-Session-setFlash('Delete method is not allowed.'); $this-redirect(array('action' = 'index',$client_id)); //since we are using php5, we can also throw an exception like: //throw new MethodNotAllowedException(); }else{ if( !$id ) { $this-Session-setFlash('Invalid id for Account'); $this-redirect(array('action'='index',$client_id)); }else{ //delete user if( $this-Account-delete($id, $cascade = true) ){ //set to screen $this-Session-setFlash('Account was deleted.'); //redirect to users's list $this-redirect(array('action'='index',$client_id)); }else{ //if unable to delete $this-Session-setFlash('Unable to delete Account.'); $this-redirect(array('action' = 'index')); } } } } } /pre * -- * * * *3.- **This is the view:*** * -- * echo $this-Html-addCrumb('Clients', '/clients'); echo $this-Html-addCrumb('Accounts', '/accounts'); echo $this-Form-create('Account'); foreach($accounts as $account): ? table cellspacing=0 cellpadding=0 style=width:600px tr td ?php echo $account['Accounttype']['description'] ?/br /td td ?php echo $this-Html-link('Edit', array('action' = 'edit', $account['Account']['id'], $client_id)); ? /td td ?php // echo $this-Html-link('Del', array('action' = 'delete', $account['Account']['id'], $client_id)); ? /td td
Re: send emails
Hi, What On Fri, Aug 3, 2012 at 4:23 PM, raj kumar Pustela pustela...@gmail.comwrote: hi all, I am struggled one thing if any one know please help me. -- 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
can somebody tell me how make AMF as plugin on cake
CpAmf v0.12 it's not working on cake 2.x i get white screen after install it! thanks -- 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: send mails
You can use Gmail as an smtp service to send the email. Configure cake php to work with SMTP and use gmail. *With Best Regards, Mohit Kumar http://kumarmohit.com* *+91-9582894570* On Fri, Aug 3, 2012 at 4:25 PM, raj kumar Pustela pustela...@gmail.comwrote: Hi to all, I am Struggled one thing, how to send email in cakephp 2.0.3 from localhost(wamp).if anyone known dat please help me. Thanks, Rajakumar. -- 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: send mails
Email config for gmail public $default = array( 'from' = array('m...@gmail.com' = 'My name'), 'host' = 'ssl://smtp.gmail.com', 'port' = 465, 'username' = 'm...@gmail.com', 'password' = 'xx', 'transport' = 'Smtp', ); You have to enable php_openssl extension in wamp... On Friday, August 3, 2012 5:16:19 PM UTC+2, mohit wrote: You can use Gmail as an smtp service to send the email. Configure cake php to work with SMTP and use gmail. *With Best Regards, Mohit Kumar http://kumarmohit.com* *+91-9582894570* On Fri, Aug 3, 2012 at 4:25 PM, raj kumar Pustela pustela...@gmail.comwrote: Hi to all, I am Struggled one thing, how to send email in cakephp 2.0.3 from localhost(wamp).if anyone known dat please help me. Thanks, Rajakumar. -- 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: Adding a fixtures causes infinite error
I have partly resolved this by downloading the latest version of Debug Toolkit as that was not handling the underlying error properly ( http://cakephp.lighthouseapp.com/projects/42880/tickets/91-serializing-pdo-instances). I now just need to learn more about using fixtures as it is causing a 'table already exists' error. Why would that happen if I've specified a fixture, or am I missing something fundamental? On Friday, 3 August 2012 06:44:12 UTC+1, Jeremy Burns wrote: To my shame, I haven't done much with testing but have taken the plunge and am adopting it for all future projects, starting now. I have the seed of a site that has a database (normal and test version) and model/view/controller. I can access faq_categories/index when using either the normal or test database configuration. I have a controller test and a model test, both work fine and pass. When I add in a fixture the site goes into an endless spiral. Not sure what I'm doing wrong - here's the model test, the fixture and the errors. Note that it works fine until uncomment the fixture. // /app/Test/Case/Model/FaqCategoryTest.php ?php App::uses('FaqCategory', 'Model'); class FaqCategoryTest extends CakeTestCase { // public $fixtures = array('app.faq_category'); public function setUp() { parent::setUp(); $this-FaqCategory = ClassRegistry::init('FaqCategory'); } public function testEnabled() { $result = $this-FaqCategory-enabled(); $expected = array( array('FaqCategory' = array('id' = 1, 'name' = 'First Category')), array('FaqCategory' = array('id' = 3, 'name' = 'Third Category')) ); $this-assertEquals($expected, $result); } } // /app/Test/Fixture/FaqCategoryFixture.php ?php class FaqCategoryFixture extends CakeTestFixture { /* Optional. Set this property to load fixtures to a different test datasource */ public $useDbConfig = 'test'; public $fields = array( 'id' = array( 'type' = 'integer', 'length' = 3, 'key' = 'primary' ), 'name' = array( 'type' = 'string', 'length' = 255, 'null' = false, 'default' = '' ), 'display_order' = array( 'type' = 'integer', 'length' = 3, 'null' = false, 'default' = 255 ), 'enabled' = array( 'type' = 'integer', 'length' = 1, 'null' = false, 'default' = 1 ), 'created' = 'datetime', 'modified' = 'datetime' ); public $records = array( array( 'id' = 1, 'name' = 'First Category', 'display_order' = 10, 'enabled' = 1, 'created' = '2012-08-02 18:00:00', 'modified' = '2012-08-02 18:00:00' ), array( 'id' = 2, 'name' = 'Second Category', 'display_order' = 20, 'enabled' = 0, 'created' = '2012-08-02 18:00:00', 'modified' = '2012-08-02 18:00:00' ), array( 'id' = 3, 'name' = 'Third Category', 'display_order' = 30, 'enabled' = 1, 'created' = '2012-08-02 18:00:00', 'modified' = '2012-08-02 18:00:00' ) ); } // RESULTS // without a fixture: 1/1 test methods complete: *1* passes, *0* fails, *1* assertions and *0*exceptions. // with a fixture // first error only occurs when I specify a db config - but then I would not expect a fixture to create a table - am I wrong? If so, I guess I need to use teardown? 2012-08-03 05:37:16 Error: Fixture creation for faq_categories failed SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'faq_categories' already exists // next error (whether the first error is present or not) #0 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/Model/Datasource/DboSource.php(2919): PDOStatement-execute() #1 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/Fixture/CakeTestFixture.php(254): DboSource-insertMulti('faq_categories', Array, Array) #2 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php(215): CakeTestFixture-insert(Object(Mysql)) #3 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/CakeTestCase.php(76): CakeFixtureManager-load(Object(FaqCategoryTest)) #4 /usr/lib/php/pear/PHPUnit/Framework/TestSuite.php(772): CakeTestCase-run(Object(PHPUnit_Framework_TestResult)) #5 /usr/lib/php/pear/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite-runTest(Object(FaqCategoryTest), Object(PHPUnit_Framework_TestResult)) #6 /usr/lib/php/pear/PHPUnit/TextUI/TestRunner.php(325): PHPUnit_Framework_TestSuite-run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false) #7 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/CakeTestRunner.php(57): PHPUnit_TextUI_TestRunner-doRun(Object(PHPUnit_Framework_TestSuite), Array) #8 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/CakeTestSuiteCommand.php(111): CakeTestRunner-doRun(Object(PHPUnit_Framework_TestSuite), Array) #9 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php(242): CakeTestSuiteCommand-run(Array) #10 /Volumes/Data/jeremyburns/Sites/mysite/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php(99):
Re: Adding a fixtures causes infinite error
Thanks - I'll give that a go. Still feel I'm missing a point here somewhere though. On Friday, 3 August 2012 11:29:02 UTC+1, Dr. Tarique Sani wrote: A bit less portable and slow but I have a separate Fixtures DB with a known set of data and all my fixtures are just a single line public $import = array('model' = 'Client', 'records' = true, 'connection' = 'fixture'); HTH Tarique On Fri, Aug 3, 2012 at 11:14 AM, Jeremy Burns jeremybu...@classoutfit.com wrote: To my shame, I haven't done much with testing but have taken the plunge and am adopting it for all future projects, starting now. -- = PHP for E-Biz: http://sanisoft.com = -- 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: Cakephp 2.x best practice when adding/editing content?
Yes, I understand what you are doing :) Have a couple of those myself.. But my question is (perhaps not clear enough), the best practice for a function like add and edit. I am thinking about: if ($this-request-is('post')) { $this-User-set($this-request-data); if ($this-User-validates()) { Those things inside the function. Like,, what approach/setup would you use on cake 2.x to talk with the db and make things happen :) I am just wondering if I am doing it 100% correct, as I can not find any good tutorials on it anywhere.. Here is my add function as is today, any pointers? public function admin_add() { $this-set('title_for_layout', __('Add new role',true)); if ($this-request-is('post')) { $this-Role-set($this-request-data); if ($this-Role-validates()) { if ($this-Role-save($this-request-data)) { $this-Session-setFlash(__('New role created.',true), 'admin/flash/success'); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('Could not create role, please try again.',true), 'admin/flash/error'); } } else { // Didn't validate } } $this-set('errors', $this-Role-validationErrors); } -Tom kl. 13:35:30 UTC+2 fredag 3. august 2012 skrev SoulRaven følgende: i use a single method, add/edit even if is user or admin, the difference between add/edit is that on edit you have the ID set, or in parameter or in $this-data admin_editpost($id = null){ if(is_null($id){ //something } } i guess you understand vineri, 3 august 2012, 11:41:01 UTC+3, MetZ a scris: Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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: Cakephp 2.x best practice when adding/editing content?
for starters, take out the validation redundancy why setting the errors to the view? also not necessary also, in 2.x your __() looks differently (arguments usually are not true but replacement strings) why dont you use baking? it would display a better output than you currently have Am Freitag, 3. August 2012 17:43:52 UTC+2 schrieb MetZ: Yes, I understand what you are doing :) Have a couple of those myself.. But my question is (perhaps not clear enough), the best practice for a function like add and edit. I am thinking about: if ($this-request-is('post')) { $this-User-set($this-request-data); if ($this-User-validates()) { Those things inside the function. Like,, what approach/setup would you use on cake 2.x to talk with the db and make things happen :) I am just wondering if I am doing it 100% correct, as I can not find any good tutorials on it anywhere.. Here is my add function as is today, any pointers? public function admin_add() { $this-set('title_for_layout', __('Add new role',true)); if ($this-request-is('post')) { $this-Role-set($this-request-data); if ($this-Role-validates()) { if ($this-Role-save($this-request-data)) { $this-Session-setFlash(__('New role created.',true), 'admin/flash/success'); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('Could not create role, please try again.',true), 'admin/flash/error'); } } else { // Didn't validate } } $this-set('errors', $this-Role-validationErrors); } -Tom kl. 13:35:30 UTC+2 fredag 3. august 2012 skrev SoulRaven følgende: i use a single method, add/edit even if is user or admin, the difference between add/edit is that on edit you have the ID set, or in parameter or in $this-data admin_editpost($id = null){ if(is_null($id){ //something } } i guess you understand vineri, 3 august 2012, 11:41:01 UTC+3, MetZ a scris: Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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: Cakephp 2.x best practice when adding/editing content?
Hi Mark.. - Setting validation errors to view to display them in an element = You need to correct: Error message 1, Error message 2, Error message 3 = Need it ;) - __('some text', true) = For translation strings, not sure why I started to use the TRUE, but I think it is because of not beeing able to only have __('some text') inside the strings (Suggestion??) And for the validation Redundancy ? what exactly do you mean? I am validating in models = and pushing messages to the view (not using the error = true on my form fields, all are set to false and display the validation messages in element as explained before. And regarding baking.. Have never used it.. =) Any good tutorials on it? I need to use terminal right? I am developing on my development VPS server, not local, but have terminal access.. Thanks for your time! -Tom kl. 20:05:19 UTC+2 fredag 3. august 2012 skrev euromark følgende: for starters, take out the validation redundancy why setting the errors to the view? also not necessary also, in 2.x your __() looks differently (arguments usually are not true but replacement strings) why dont you use baking? it would display a better output than you currently have Am Freitag, 3. August 2012 17:43:52 UTC+2 schrieb MetZ: Yes, I understand what you are doing :) Have a couple of those myself.. But my question is (perhaps not clear enough), the best practice for a function like add and edit. I am thinking about: if ($this-request-is('post')) { $this-User-set($this-request-data); if ($this-User-validates()) { Those things inside the function. Like,, what approach/setup would you use on cake 2.x to talk with the db and make things happen :) I am just wondering if I am doing it 100% correct, as I can not find any good tutorials on it anywhere.. Here is my add function as is today, any pointers? public function admin_add() { $this-set('title_for_layout', __('Add new role',true)); if ($this-request-is('post')) { $this-Role-set($this-request-data); if ($this-Role-validates()) { if ($this-Role-save($this-request-data)) { $this-Session-setFlash(__('New role created.',true), 'admin/flash/success'); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('Could not create role, please try again.',true), 'admin/flash/error'); } } else { // Didn't validate } } $this-set('errors', $this-Role-validationErrors); } -Tom kl. 13:35:30 UTC+2 fredag 3. august 2012 skrev SoulRaven følgende: i use a single method, add/edit even if is user or admin, the difference between add/edit is that on edit you have the ID set, or in parameter or in $this-data admin_editpost($id = null){ if(is_null($id){ //something } } i guess you understand vineri, 3 august 2012, 11:41:01 UTC+3, MetZ a scris: Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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
CakePHP 2.X Issues with rounting
Hi everyone, I'm upgrading a baked application from 1.3 to 2.2.1 and I'm running into some issue with the routes, in short its not working. I have Router::connect('/login', array('controller' = 'users', 'action' = 'login')); Set up my controller UsersController and model of course, the login.ctp is at View/Users/login.ctp However I'm getting the following error Not Found The requested URL /app/webroot/login was not found on this server. I tried everything and have no idea why its not working anymore. -- 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
Max height for form input cakephp 2.2
So I just started an app with the latest version of cakephp and it's working wonderfully. I have an input field which lists options from a table in the form of check-boxes which allows for multiple options to be selected. The problem is, there are 1200 options and right now it lists them all(Without a scrollbar) so there's a lot of scrolling going on. Is it possible to specify a maximum height and put a scrollbar? Here's my view and controller. Condition HABTM Drugs and that all works fine. * View:* ?php echo $this-Form-create('Condition'); ? fieldset legend?php echo __('Add Condition'); ?/legend ?php echo $this-Form-input('condition'); echo $this-Form-input('principles'); echo $this-Form-input('treatment'); echo $this-Form-input('Drug',array( 'label' = __('Drugs',true), 'type' = 'select', 'multiple' = 'checkbox', 'options' = $drugs, 'selected' = $this-Html-value('Drug.Drug'), )); echo $this-Form-input('clinical_tips'); echo $this-Form-input('suggested_reading'); ? /fieldset ?php echo $this-Form-end(__('Submit')); ? * Controller Function:* public function add() { if ($this-request-is('post')) { $this-Condition-create(); if ($this-Condition-save($this-request-data)) { $this-Session-setFlash(__('The condition has been saved')); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('The condition could not be saved. Please, try again.')); } } $drugs = $this-Condition-Drug-find('list',array('fields'=array('id','generic'))); $this-set(compact('drugs')); } -- View this message in context: http://cakephp.1045679.n5.nabble.com/Max-height-for-form-input-cakephp-2-2-tp5710136.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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: Cakephp 2.x best practice when adding/editing content?
Validation redundancy. When save is called, the data passed to it in the first parameter is validated using CakePHP validation mechanism. Read more on Models - Saving your data. Also, the validation errors are already available to the view so no need to set them. Try bake and see what it does to get a better feel of the cake way. Gary On Fri, Aug 3, 2012 at 1:43 PM, MetZ met...@gmail.com wrote: Hi Mark.. - Setting validation errors to view to display them in an element = You need to correct: Error message 1, Error message 2, Error message 3 = Need it ;) - __('some text', true) = For translation strings, not sure why I started to use the TRUE, but I think it is because of not beeing able to only have __('some text') inside the strings (Suggestion??) And for the validation Redundancy ? what exactly do you mean? I am validating in models = and pushing messages to the view (not using the error = true on my form fields, all are set to false and display the validation messages in element as explained before. And regarding baking.. Have never used it.. =) Any good tutorials on it? I need to use terminal right? I am developing on my development VPS server, not local, but have terminal access.. Thanks for your time! -Tom kl. 20:05:19 UTC+2 fredag 3. august 2012 skrev euromark følgende: for starters, take out the validation redundancy why setting the errors to the view? also not necessary also, in 2.x your __() looks differently (arguments usually are not true but replacement strings) why dont you use baking? it would display a better output than you currently have Am Freitag, 3. August 2012 17:43:52 UTC+2 schrieb MetZ: Yes, I understand what you are doing :) Have a couple of those myself.. But my question is (perhaps not clear enough), the best practice for a function like add and edit. I am thinking about: if ($this-request-is('post')) { $this-User-set($this-request-data); if ($this-User-validates()) { Those things inside the function. Like,, what approach/setup would you use on cake 2.x to talk with the db and make things happen :) I am just wondering if I am doing it 100% correct, as I can not find any good tutorials on it anywhere.. Here is my add function as is today, any pointers? public function admin_add() { $this-set('title_for_layout', __('Add new role',true)); if ($this-request-is('post')) { $this-Role-set($this-request-data); if ($this-Role-validates()) { if ($this-Role-save($this-request-data)) { $this-Session-setFlash(__('New role created.',true), 'admin/flash/success'); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('Could not create role, please try again.',true), 'admin/flash/error'); } } else { // Didn't validate } } $this-set('errors', $this-Role-validationErrors); } -Tom kl. 13:35:30 UTC+2 fredag 3. august 2012 skrev SoulRaven følgende: i use a single method, add/edit even if is user or admin, the difference between add/edit is that on edit you have the ID set, or in parameter or in $this-data admin_editpost($id = null){ if(is_null($id){ //something } } i guess you understand vineri, 3 august 2012, 11:41:01 UTC+3, MetZ a scris: Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direction with my app. So if anyone could give me an idea about a couple simple add/edit functions, and how the best practice for this, I would appreciate it :) like: admin_users_add() { } admin_users_edit() { } and other regular functions you might have an example for. Thanks all! Awesome! -Tom -- 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: Problem associating models with linux (working fine on windows using xampp)
How you solve the problem?¡ El viernes, 15 de junio de 2012 09:51:58 UTC-4, chris7548 escribió: Hello, I have developed an cakephp application on an xampp installed on a windows 7 ios. On this configuration everything works fine. But when i try to run the application on a linux ios the model associations aren't interpreted anymore: Example: I've got a table user that has got a suffix_id for identifiying the email_suffix of the user. The user data is accessed by the EvaluationsController via the Evaluation model. class User extends AppModel { public $primaryKey = 'id'; public $name = 'User'; public $belongsTo = 'Suffix'; public $hasMany = array('GroupMember', 'Result', 'Supervisor'); public $useTable = 'users'; } class Suffix extends AppModel { public $primaryKey = 'id'; public $name = 'Suffix'; public $hasMany = 'User'; public $useTable = 'suffixes'; } class Evaluation extends AppModel { public $useTable = false; public $hasOne = array('Exercise', 'GroupMember', 'Group', 'Result', 'Supervisor', 'User'); } class EvaluationsController extends AppController { public $helpers = array('Html', 'Form'); public function index() { ... $users = $this-Evaluation-User-findAllById(6); ... } } The generated SQL-Statement on linux is: SELECT `User`.`id`, `User`.`surname`, `User`.`forename`, `User`.`email_prefix`, `User`.`suffix_id`, `User`.`valid` FROM `This- is-GRADE`.`users` AS `User` WHERE `User`.`id` = 6 The right SQL-Statement (generated on windows) is: SELECT `User`.`id`, `User`.`surname`, `User`.`forename`, `User`.`email_prefix`, `User`.`suffix_id`, `User`.`valid`, `Suffix`.`id`, `Suffix`.`suffix` FROM `This-is-GRADE`.`users` AS `User` LEFT JOIN `This-is-GRADE`.`suffixes` AS `Suffix` ON (`User`.`suffix_id` = `Suffix`.`id`) WHERE `User`.`id` = 6 Anyone has got an idea why this code is just working on windows and linux don't understand it correctly? -- 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: CakeTrap. A HTML5 CakePHP Bootstrap
Hi. I want update it to CakePHP 2.2.x. All I need to do is update the lib folder? -- 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: Proper MVC location for a function and its call
On Fri, Aug 3, 2012 at 9:22 AM, kevin.ncbible ke...@ncbible.com wrote: A. That was it. So, it makes sense doesn't it, that when you're in the model you do not need to reference the model, so $this-getPath(...) is enough. So, in MVC terminology, I'm using the model to retrieve the data. Yes, that's right. In any class, $this refers to the instantiated object. re: Set, although I had read about it, I also was not getting the significance of set to the MVC pattern. I assume that is the main reason, for instance, that I would not be calling a function FROM the view: it's more like the Model and Controller are pushing (I'm sure there's a better word) the data to the view. Yes, that's a very good way of putting it. The set() method makes variables available to the View object. More specifically, it add the var to the controller's $viewVars array, which Cake makes available to View. Now, in my case, the $id value for a particular topic is available in the view or edit action, but not in the index or add action. So you've really helped me with making the level variable available to the view or edit action. What if, however, for the index page, I had the $id available, but only via a request param. Would that be a case where set would not work and I would have to somehow call the getLevel function right from the view? A. I guess I do have $id available, in the index action, via $id = $this-request-params['named']['id']; Then I could go ahead and use $this-set('level', $this-TopicTree-getLevel($id)); Does that make sense? I'll have to try that! Tentatively, yes. I couldn't say for sure without knowing more about what you're doing. -- 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: Concurrent login issue: Users being logged out
On Fri, Aug 3, 2012 at 3:22 AM, phpMagpie p...@webbedit.co.uk wrote: I'm not sure what database logs are going to tell me about why a session is timing out, or Auth is unauthorising a user. Because you're using DB sessions, so seeing the DB's query logs will tell you what's going on. BTW, does this occur when using regular file sessions? Also from OP: I am using Auth with Database Sessions And if you change that to file sessions, does the problem persist? -- 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: paypal returning link not working
How could anyone help you with such a vague question? On Thu, Aug 2, 2012 at 10:06 PM, ecom letterlet...@hotmail.com wrote: hello does anyone know why paypal returning link not working after payment?? regards ecom -- View this message in context: http://cakephp.1045679.n5.nabble.com/paypal-returning-link-not-working-tp5710100.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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: CakePHP 2.X Issues with rounting
Set debug to 2. Cake sends a generic 404 when there's an error when debug is disabled. On Fri, Aug 3, 2012 at 3:23 PM, Almog Koren al...@almogdesign.net wrote: Hi everyone, I'm upgrading a baked application from 1.3 to 2.2.1 and I'm running into some issue with the routes, in short its not working. I have Router::connect('/login', array('controller' = 'users', 'action' = 'login')); Set up my controller UsersController and model of course, the login.ctp is at View/Users/login.ctp However I'm getting the following error Not Found The requested URL /app/webroot/login was not found on this server. I tried everything and have no idea why its not working anymore. -- 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: Max height for form input cakephp 2.2
This is a CSS issue. Hint: max-height On Fri, Aug 3, 2012 at 4:07 PM, Shosho shinsuio0...@gmail.com wrote: So I just started an app with the latest version of cakephp and it's working wonderfully. I have an input field which lists options from a table in the form of check-boxes which allows for multiple options to be selected. The problem is, there are 1200 options and right now it lists them all(Without a scrollbar) so there's a lot of scrolling going on. Is it possible to specify a maximum height and put a scrollbar? Here's my view and controller. Condition HABTM Drugs and that all works fine. * View:* ?php echo $this-Form-create('Condition'); ? fieldset legend?php echo __('Add Condition'); ?/legend ?php echo $this-Form-input('condition'); echo $this-Form-input('principles'); echo $this-Form-input('treatment'); echo $this-Form-input('Drug',array( 'label' = __('Drugs',true), 'type' = 'select', 'multiple' = 'checkbox', 'options' = $drugs, 'selected' = $this-Html-value('Drug.Drug'), )); echo $this-Form-input('clinical_tips'); echo $this-Form-input('suggested_reading'); ? /fieldset ?php echo $this-Form-end(__('Submit')); ? * Controller Function:* public function add() { if ($this-request-is('post')) { $this-Condition-create(); if ($this-Condition-save($this-request-data)) { $this-Session-setFlash(__('The condition has been saved')); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('The condition could not be saved. Please, try again.')); } } $drugs = $this-Condition-Drug-find('list',array('fields'=array('id','generic'))); $this-set(compact('drugs')); } -- View this message in context: http://cakephp.1045679.n5.nabble.com/Max-height-for-form-input-cakephp-2-2-tp5710136.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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: paypal returning link not working
thanks, got fixed,now Date: Fri, 3 Aug 2012 18:08:50 -0700 From: ml-node+s1045679n5710142...@n5.nabble.com To: letterlet...@hotmail.com Subject: Re: paypal returning link not working How could anyone help you with such a vague question? On Thu, Aug 2, 2012 at 10:06 PM, ecom [hidden email] wrote: hello does anyone know why paypal returning link not working after payment?? regards ecom -- View this message in context: http://cakephp.1045679.n5.nabble.com/paypal-returning-link-not-working-tp5710100.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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 [hidden email] 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 [hidden email] For more options, visit this group at http://groups.google.com/group/cake-php If you reply to this email, your message will be added to the discussion below: http://cakephp.1045679.n5.nabble.com/paypal-returning-link-not-working-tp5710100p5710142.html To unsubscribe from paypal returning link not working, click here. NAML -- View this message in context: http://cakephp.1045679.n5.nabble.com/paypal-returning-link-not-working-tp5710100p5710145.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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: Cake Developer
Hi, This is Jeet from New Delhi India.I have 2+ years of experience in Cakephp (1.2.* to 2.0.*) near about 5-6 big projects i have made on cakephp. Beside this i have good control on (MVC Concepts, Mysql,CSS,JQuery.) My total experience is 4+ years. Kindly consider me too, in your team. Regards, Jeetendra On Thu, Aug 2, 2012 at 5:50 PM, Sarvesh Tiwari tiwari.serv...@gmail.comwrote: Hi, I have 2+ year experience in cakephp development inpite of 5.5 years total exp. I have some time now a days. On Thu, Aug 2, 2012 at 2:29 PM, regai Kanongota rkanong...@gmail.comwrote: i am interested in joining the team. On Thu, Aug 2, 2012 at 6:02 AM, gw gw5...@gmail.com wrote: Hello, We are looking to add some team members. If you have the time and the cake skills, drop me a line and we can talk. Thanks, G -- 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 -- Que Dieu vous bénisse, Regai Kanongota 00263772105204 -- 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 -- 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