Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
pode perguntar. Att, -- Luiz Antonio S Messias Desenvolvedor Web <http://twitter.com/tonyzrp> @tonyzrp <http://twitter.com/tonyzrp> *LinkedIn* <http://www.linkedin.com/in/luizantoniosmessias> 2013/4/22 Anderson Moraes > Tony, obrigado pela resposta. > > Não ente

Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
Tem isso aqui: http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#creating-notification-messages Att, -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp *LinkedIn*

Re: Image Upload

2013-03-01 Thread Tony Messias
See this: http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::file Att, -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp *LinkedIn* On 1 March 2013 13:56, S

Re: Best way to retriving api and webservice data

2013-02-25 Thread Tony Messias
Mathias R wrote: > Hi, > > thx for your answer. I read about datasources too but i don't know how to > work with. > i want to access data from xml-, json- and/or soap-webservices. > > M. > > Am Montag, 25. Februar 2013 04:04:35 UTC+1 schrieb Tony: >> >&

Re: Best way to retriving api and webservice data

2013-02-24 Thread Tony Messias
I've never used (and I would like to), but I believe it would be the case of using/creating *DataSources:* * * http://book.cakephp.org/2.0/en/models/datasources.html* * Att, -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp *LinkedIn

Re: Multi Tenancy / SaaS

2013-02-03 Thread Tony Messias
Well, I believe it's possible to get the authenticated user from anywhere using the AuthComponent::user() static method (cake 2.x). I tried it here, and it worked.. but I couldn't test it using TDD, I found it veeery hard.. Could anyone help? How can I test a model that depends on a logged user? Is

Re: Adding multple records through REST XML web services

2012-11-28 Thread Tony Messias
You have to parse the XML to Cake's pattern and then you can use saveMany, for example. http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-savemany-array-data-null-array-options-array Att, -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp

Re: One slug route connected to multiple controllers?

2012-08-30 Thread Tony Messias
If you use different constants on your slug, like "Dis*Person*IsKewl " or "TehEpic*Startup*", I think you can do it with regular expression. e.g. https://gist.github.com/3526814 Well, I think it could work. If the slug match with the first regular expression, it will call the StartupsController.

Re: Cakephp with Extjs

2012-07-13 Thread Tony Messias
Well, I think it might help you: http://banchaproject.org/ In case you don't want to use this project, you could simply use the extjs way of development with a folder in it named "php", where you'll have the cakephp inside. Then, on your Stores (extjs), you point to "php/:Controller/:action.json".

Is CakePHP 2.x support firebird database

2012-06-26 Thread tony
If yes, how to connect to firebird database? -- 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

Re: Recover associated data of second level.

2012-05-12 Thread Tony Messias
What about the "recursive" param on your params array? http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find i.e: $this->User->find('all', array('recursive' => 2)); -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp *Li

Re: Send email Shell Application

2012-05-02 Thread Tony Presnow
I recently upgraded from cakephp 2.0.6 to 2.1.1 and started having problem sending out nightly emails. I'm getting smtp connection time out errors. Nothing has changed on the email server, and emails generated from website forms are still working ... Is it possible that the connection is being

Re: Flash message after render not showing

2012-02-06 Thread Tony
I'm a dufus. I didn't realize that $this->Session->flash() had been commented out of the view. When I did debug($this->Session->read()) in the view, I noticed that the value was set, so that sent me on the right path. Sorry for the bother. Thanks for the reply. -- Our newest site for the commu

Flash message after render not showing

2012-02-05 Thread Tony
In my code (CakePHP v2.0.5) , I am doing the following: public function invite() { ... $this->Session->setFlash(__('The invitation has been created.')); $this->set('email',$this->request->data['Invite']['email']);

Help with CakePHP-LinkedIn Plugin

2012-01-17 Thread Tony Smith
Good day. I am trying to do some basic LinkedIn integration and am having a lot of trouble with the CakePHP-LinkedIn plugin. For the moment, I would just like to add an action to my UsersController that dumps my LinkedIn profile. Nothing fancy, just a basic print_r of the information received bac

Confusion with model, belongsTo, and conditions

2011-05-20 Thread Tony
I have what I think is a simple model and I am trying to apply some conditions, but it appears that the conditions are being ignored. Here is a simplified version of the models (that is, I left out some lines for brevity): Model 1 - Query: --- class Query extends AppModel { v

How to make random user names out of list of a list of names in a text file, I can not complete my php script

2011-01-25 Thread Tony
Hi; I am not expert in php and trying to make a php script for making random user names from a list of first names in a text file and write it to a new text file, I got some simple php code but I am not sure how to proceed, I am very grateful if anyone can help here., I have a list of first name

Multiple tables output at one View

2010-08-14 Thread tony mak
I have just learnt cakephp. If I do not misunderstand the tutorial, one model represents one table in database and each controller controls one model which means one table. And one view for one controller to layout the webpage. Then, if my view(webpage) need to have data from more than one table, w

Re: Complex find() using Oracle

2010-02-18 Thread Tony Fugere
post the test case (or even better, a patch) to avoid > other people waste time with the same issue. > > Bye > > MARTIN > > > > > On 02/18/2010 05:39 PM, Tony Fugere wrote: > > It does not fix the problem. Am I doing it correctly? > > $dbo = $this-

Re: Complex find() using Oracle

2010-02-18 Thread Tony Fugere
aw up a test case and report the issue of DECODE failing to function properly. Thanks for your help Martin! -Tony On Thu, Feb 18, 2010 at 11:40 AM, Martin Radosta wrote: > Check the text case in this commit for an example: > > > http://github.com/cakephp/cakephp1x/commit/02330b2d9c292

Re: Redirect After Using render('action')

2009-09-25 Thread Tony Thomas
lly want the form to disappear, use JS to submit the form > using AJAX and hide/change certain elements of the page. > > On Thu, Sep 24, 2009 at 3:17 PM, Tony Thomas wrote: > > > I have a controller function that's using $this->render('action') to > > render

Redirect After Using render('action')

2009-09-24 Thread Tony Thomas
I have a controller function that's using $this->render('action') to render a view that creates a CSV file after submitting some info in a form. What I want to do is redirect the user after the CSV file is downloaded. So the steps would be: 1. User submits data. 2. Queries are run and a CSV file

Re: Ajax Errors

2009-08-11 Thread Tony Thomas
ors as json > > please see : > > http://book.cakephp.org/view/410/Validating-Data-from-the-Controller > > On Aug 10, 3:42 pm, Tony Thomas wrote: > > > This is something that's so simple, I'm embarrassed to ask. But after > > a few dozen Google searches, I'

Ajax Errors

2009-08-10 Thread Tony Thomas
This is something that's so simple, I'm embarrassed to ask. But after a few dozen Google searches, I'm going to swallow my pride and post my question here. I have a simple ajax function in my controller and I want it to return an error is the request is not successful. For example: function ajax

Re: Create Dynamic Navigation Based On Tree Behavior

2009-07-29 Thread Tony Thomas
> > } > > $is_current = (isset($section_node_id) && $section_node_id == > $data['Section']['id']) >         ? ' class="Current"' >         : null; > > echo ' rel="'.$data['Section']['id'].&#x

Create Dynamic Navigation Based On Tree Behavior

2009-07-26 Thread Tony Thomas
I have a Pages table in my app with the following fields: id parent_id lft rght title body created modified My model uses $actsAs = array('Tree') All the data associations are correct and generatetreelist() returns the appropriate values. What I'm looking for is a way to turn the tree informati

Re: Database Table not Found for a Model I haven't Created

2009-07-01 Thread Tony Bianco
doing that when you don't need it to do so in a controller action. Thanks! On Jul 1, 7:37 am, NegoBlack® wrote: > I think you must create the model Site and configure it to do not use > a table like this: > > class Site extends AppModel { >     var $useTable = false; > >

Re: Database Table not Found for a Model I haven't Created

2009-06-30 Thread Tony Bianco
our models' associations. I think you probably have a > Site model listed somewhere. > > On Tue, Jun 30, 2009 at 12:25 PM, Tony wrote: > > > I'm running into a problem in getting this error: > > Error:  Database table sites for model Site was not found. > > >

Database Table not Found for a Model I haven't Created

2009-06-30 Thread Tony
I'm running into a problem in getting this error: Error: Database table sites for model Site was not found. I don't have a model for Sites because I don't even have a table for it. I have a Sites controller but in the $uses array it is using the model "User". Can anyone help me here. --~--~---

Building a helper; Fatal error cake/libs/view/view.php on line 702

2009-03-24 Thread Tony Thomas
I want to build some options for use across several views, so a custom HTML helper seems like the best option. However, I'm running into problems. Here's the helper: class PositionHelper extends AppHelper { var $helpers = array('Html'); function getPositions() { $yaxes = array

Re: Mod_rewrite not working

2009-03-21 Thread Tony Thomas
I still don't know exactly what the problem was, but I downloaded a new copy of cake and moved my models and controllers over and it worked right away. Something must have happened when copying the files over originally. On Mar 21, 11:10 am, Tony Thomas wrote: > mod_rewrite is enabled

Re: Mod_rewrite not working

2009-03-21 Thread Tony Thomas
mod_rewrite is enabled. Like I mentioned, I can run another CakePHP app already using mod_rewrite with my current setup. It's only this brand new one that's behaving bizarrely. On Mar 20, 5:22 pm, Miles J wrote: > Id first check your apache config files anyways, to make sure > mod_rewrite is ena

Mod_rewrite not working

2009-03-20 Thread Tony Thomas
I'm starting up a fresh project in Cake, so I downloaded the latest version, built my models and controllers using $scaffold, but the app is acting like mod_rewrite is not working. The .htaccess files are all there. I'm running a local setup using MAMP on OS X. The odd thing is that I have anoth

Retrieve Associated Count

2009-03-17 Thread Tony Thomas
I have a simple hasMany relationship set up with CakePHP and I want to retrieve a couple of fields from the parent table based on the count of the child. The scenario: I have boxes that hold 81 aliquots each. (Each box is 9X9.) I want to retrieve the id and description from the boxes table of box

Re: Redirect Loop

2009-03-14 Thread Tony Thomas
standing of the problem is correct. In any case, the problem was solved. On Mar 11, 4:07 pm, Tony Thomas wrote: > I've been working on a local copy of my CakePHP app that runs on a my > computer. Today I've only been working on a layout and the style > sheet. I took a break and

Redirect Loop

2009-03-11 Thread Tony Thomas
I've been working on a local copy of my CakePHP app that runs on a my computer. Today I've only been working on a layout and the style sheet. I took a break and went back to it which prompted a new login. Suddenly I'm getting a redirect loop. Firefox gives me this following message: Redirect Loop

Best Way to Nest Lists w/ nestedList()

2009-03-11 Thread Tony Thomas
I'm trying to create navigation in CakePHP that uses this method with CSS drop-downs: http://www.webmonkey.com/tutorial/Add_CSS_Drop-Down_Menus So, of course I want to leverage nestedList(), but since I have two "levels" of nested lists, I'm getting unexpected results. Here's what I want: Main

Re: "Undefined variable: javascript" when Javascript is absolutely loaded

2009-02-27 Thread Tony Thomas
zarre happening with the server. On Feb 27, 1:51 pm, brian wrote: > On Fri, Feb 27, 2009 at 2:42 PM, Tony Thomas wrote: > > > This problem just cropped up out of the blue for me. I made no changes > > to the AppController where the helpers are defined. I can't figure it >

Re: "Undefined variable: javascript" when Javascript is absolutely loaded

2009-02-27 Thread Tony Thomas
I forgot to add that if I remove 'echo $javascript->link('js.js');' nothing is rendered at all. Even if I hand code the link to the JavaScript. It's truly bizarre and has broken my entire application. On Friday afternoon no less. :-( On Feb 27, 1:42 pm, Tony Thomas

Re: "Undefined variable: javascript" when Javascript is absolutely loaded

2009-02-27 Thread Tony Thomas
This problem just cropped up out of the blue for me. I made no changes to the AppController where the helpers are defined. I can't figure it out. The JavaScript file in question is clearly in the HTML, but everything is broken. I had made a simple change to a different controller that seemed to p

Re: Odd Behavior with allow()

2009-02-13 Thread Tony Thomas
're using for this? > > And, are you certain that the both servers have an identical routes.php? > > On Fri, Feb 13, 2009 at 1:07 PM, Tony Thomas wrote: > > > I moved my CakePHP app to a new server and everything is working fine > > except the one area where I have to a

Odd Behavior with allow()

2009-02-13 Thread Tony Thomas
I moved my CakePHP app to a new server and everything is working fine except the one area where I have to allow public access. The controller I want to allow is 'report', so in the pertinent controller, I have this: function beforeFilter() { $this->Auth->allow('report');

Re: Migrating to Media Temple DV Server - Path problem

2009-01-22 Thread Tony Thomas
Aha! After further investigation, the .htaccess from cake's root was missing. Once I created that, all was fixed. On Jan 22, 10:20 am, Tony Thomas wrote: > I'm moving my CakePHP app onto to a Media Temple Dedicated Virtual > server and my paths are all wrong. > > There

Migrating to Media Temple DV Server - Path problem

2009-01-22 Thread Tony Thomas
I'm moving my CakePHP app onto to a Media Temple Dedicated Virtual server and my paths are all wrong. There seem to be two issues, one more severe than the other: First, the paths to webroot don't work, so the head of my document links my stylesheet like so: Notice that first, index.php is in

Re: Label information for Multiple Checkboxes

2009-01-20 Thread Tony Thomas
#x27;, 'multiple' > => 'checkbox')); > > Alternatively, if you want the checkboxes grouped - say by specimen > type, then use this: > > $this->set('aliquots', Set::combine($aliquots, >   '{n}.Aliquot.id', >   array( >     '{0} [{1} / {

Re: Label information for Multiple Checkboxes

2009-01-20 Thread Tony Thomas
isplay a nested array correctly. It's fine if I only define a single field in my find, but since it uses the array for the labels as well as the value for each checkbox, I can't define more information there to be displayed only in the label. At least I haven't figured out how. I could

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I follow you up to this bit: > > echo $form->input( > 'Category', > array( > 'type'=>'select', > 'multiple'=>'checkbox', > 'options'=>$ids, > 'label'=>false > ) > ); > ?> This doesn't seem to solve the problem of gett

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I tried that very thing, but it didn't produce the expected results. Maybe find('list', $options) isn't meant to accommodate more than a single field. I'm not sure. On Jan 15, 11:34 am, "David Coleman" wrote: > You could also do something like this in your controller: > >             $aliquots =

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
what you > need. > > -Original Message- > From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf > > Of Tony Thomas > Sent: Thursday, January 15, 2009 4:52 PM > To: CakePHP > Subject: Re: Label information for Multiple Checkboxes > > T

Re: Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
hrough it, building each checkbox one at a time instead of my example below. Or am I missing something? On Jan 15, 11:01 am, grigri wrote: > You need to set the $displayField property inside your `Aliquot` model > to whatever field you want for the label. > > On Jan 15, 4:47 pm, Tony Tho

Label information for Multiple Checkboxes

2009-01-15 Thread Tony Thomas
I'm building a list of checkboxes like so: echo $form->input('Aliquot.id', array( 'label' => FALSE, 'type' => 'select', 'multiple' => '

Anyone Integrate with iContact

2008-12-23 Thread Tony
Has anyone integrated their CakePHP application with iContact? Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegro

Re: Error Messages Not Displaying in View or in Validations Array

2008-12-19 Thread Tony
ent action. Is that much clearer? (if that's even a word LOL) On Dec 19, 10:57 am, Tony wrote: > Well I have a model for the user table and I have a controller called > businesses and within businesses I have two actions (index and > thank_you). In my controller I am using the model

Re: Error Messages Not Displaying in View or in Validations Array

2008-12-19 Thread Tony
add form is shown -> data submitted to user/ > add action -> user/add validates data -> form is repeated if invalid > OR redirect user to secondary page. > > On Dec 18, 3:51 pm, Tony wrote: > > > For some reason I can't get my error messages for validations to w

Error Messages Not Displaying in View or in Validations Array

2008-12-18 Thread Tony
For some reason I can't get my error messages for validations to work. I tried outputting the validations by doing: pr($this->validationErrors); But all I get is an empty array. What do you guys see that I'm doing wrong? Thanks, Tony Here's my model:

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Tony Thomas
Fantastic. That worked! On Dec 9, 9:30 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > I would: > > >  * create a method in your model to fetch the data > >  * create a method in your controller to access this data > >  * create an element that calls via 'requestAction' the data from the > > co

Re: using Google Visualization

2008-12-09 Thread Tony Thomas
"http://www.google.com/jsapi"; doesn't appear to be a valid URL for the library you're trying to use. On Dec 9, 7:30 am, Juan <[EMAIL PROTECTED]> wrote: > I'm trying to use the Google Visualization API with my CakePHP app. > The two first obstacles are: > > - how to link an external JS library? >

Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Tony Thomas
I'm working on an application to store information on lab specimens. The lab receive specimens which are divided into aliquots which are then put into boxes and in turn stored in freezers. I want to create a function to find all unstored aliquots and display a message on every page to alert the l

Re: Error when submitting form to a controller using different model name

2008-12-08 Thread Tony
avaScript files correctly and that was causing the layout error. Once I fixed that everything worked out just fine. - Tony On Dec 7, 9:42 pm, thatsgreat2345 <[EMAIL PROTECTED]> wrote: > Do you have a controller called businesses_controller.php and in that > a function called thank_you?

Error when submitting form to a controller using different model name

2008-12-07 Thread Tony
I'm in the process of creating a website that is for my affiliates and their information is stored into a model called 'User' and I have a controller called businesses with two actions; index and thank_you. When a prospect lands onto the page they are given a sales letter and a form to fill out.

Creating and Using True Self-referential Joins

2008-12-06 Thread Tony
look at some Rails examples to see how they are doing. I think they have acts_as_tree. Thanks, Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-

updateAll Syntax question

2008-12-05 Thread Tony Thomas
I have a scenario where I want to update multiple records simultaneously. In this case, I have a form with check boxes next to ids from the table I want to update. These are aliquots stored in a lab. updateAll seems like a natural solution, except I can't quite get my head around defining the pro

Re: Warning 512 error, I make the tmp dir writable and I get more errors

2008-11-29 Thread Tony
Yes that did it! Thank you so much. It was driving me crazy. On Nov 29, 1:12 am, majna <[EMAIL PROTECTED]> wrote: > check permission of this file:tmp/cache/persistent/ > cake_core_core_paths > > set permissions totmprecursive. > chmod -R 0777tmp > > On Nov 29, 6:04

Warning 512 error, I make the tmp dir writable and I get more errors

2008-11-28 Thread Tony
This is driving me crazy and I have googled this and nothing that I have found is fixing this problem I'm having. I'm getting the typical Warning 512 error where it says that my "app/ tmp/cache/ is not writable". I go to chmod 777 this directory and all hell brakes loose on me and I get a whole b

Manual Search Not Working?

2008-10-01 Thread Tony Thomas
Has something changed with the CakePHP Cookbook's search (book.cakephp.org)? Over the last few days every search turns up no results. I just tried a search for "model" and it returned no results. Anyone who works on that know anything? --~--~-~--~~~---~--~~ You rece

Re: Auth Redirect Problems

2008-09-30 Thread Tony Thomas
7; > => 'login'); >         $this->Auth->logoutRedirect = '/'; >         $this->Auth->loginRedirect = array('controller' => 'users', 'action' > => 'login'); >         $this->Auth->autoRedirect = FA

Get month, day, year helper to put dates in an array

2008-09-29 Thread Tony Thomas
I'm using the form helpers for month, day & year to record several start and end dates. What I'd like is for each respective helper to create an array of months, days & years. I don't think there's a way to do that with the helper the way it is, is there? Right now $form->month('Model.field', dat

Re: Auth Redirect Problems

2008-09-26 Thread Tony Thomas
eFilter : > > function beforeFilter() { >   $this->Auth->loginRedirect = array('controller' => 'controller_name', > 'action' => 'index'); >    $this->Auth->autoRedirect = FALSE; // so after logging in we're not auto > redirected

Re: Best way to validate dates to prevent future dating

2008-09-25 Thread Tony Thomas
t) >                         $valid = true; > >         return $valid; >     } > > On Sep 16, 3:08 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > > I was afraid that might be the case > > > It's really not difficult :-) > > > And its a

Auth Redirect Problems

2008-09-09 Thread Tony Thomas
If someone is familiar with a post to this group or blog entry that addresses this issue, please let me know. I've spent the morning scouring both with no satisfactory results. I have a cakePHP app on a shared server. In local testing, everything worked fine. But mod_rewrite did not function prop

Re: Auth login redirect unreliable?

2008-09-09 Thread Tony Thomas
Plus, the problem I ran into with this solution is that the logout function goes into an infinite loop. I will note that I didn't have problems with redirect until I started using database sessions & stopped using mod_rewrite because of restrictions on the shared server I'm using. On Jul 15, 8:5

Re: Retrieving User Information with Auth/Acl

2008-07-03 Thread Tony Thomas
On Jul 3, 6:23 pm, francky06l <[EMAIL PROTECTED]> wrote: > I do not understand the "on the fly" there .. Meaning I don't want to have to statically define who can do what. Instead of something like: if ($this->Auth->user('username') == 'User1') { // allow them to do stuff } else { //

Retrieving User Information with Auth/Acl

2008-07-03 Thread Tony Thomas
I've been trying to get Acl working for a long time now. I think I'm very close, but I'm tired of doing endless Google searches for an answer, so I'm just going to ask. My Acl is all set up in the database, and Auth is working. It's the Acl check that I'm not getting. This article got me close:

Firefox 3 Cookies & Auth

2008-06-30 Thread Tony Thomas
I spent a long time on this so I thought I'd share it with the community. I was wracking my brain trying to get Auth to work properly on a site I'm testing locally in Firefox 3. No matter what I did, the application locked me out with a message stating "You are not authorized...". I read several b

Re: Defining more than one hasMany relationship

2008-05-19 Thread Tony Thomas
// prints nothing > > reset($numbers); > print_r(current($numbers)); // prints '1' > > print_r($numbers); // prints 'array([0] => 1, [1] => 2 > ...)' > > On 16 May 2008, at 22:26, Tony Thomas wrote: > > > &

Re: Defining more than one hasMany relationship

2008-05-16 Thread Tony Thomas
No. It's simply looping through and echoing the array, but once it does, the contents of the array are no longer available. As soon as I looped through using while(list($key, $value) = each($array) instead of a foreach loop, I was able to loop through it twice to create the second table. Please co

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
out once I realized the foreach() operates on a copy of the array and list($key, $value) = each($array) doesn't. http://us2.php.net/foreach http://us2.php.net/manual/en/function.list.php (Links for reference to those who might come upon this in the future. Hello from the past.) On May 15, 2:2

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
I get the same "Undefined index" message. How can I preserve that array to reuse it to make a second table? On May 15, 12:35 pm, Tony Thomas <[EMAIL PROTECTED]> wrote: > debug($patient) produces: > > Array > ( > [Patient] => Array > ( >

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
end_date] => 12/21/2006 [severity] => [exported] => [date_reported] => [created] => [modified] => ) // again truncated by me, but the list of 25 shows up in the array

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
print_r($patient['M5Symptom']) results in the expected list of symptoms: Array ( [0] => Array ( [id] => 19 [patient_id] => 5007 [symptom] => Stuffy Nose [start_date] => 12/18/2006 [end_date] => 12/21/2006 [severit

Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
Hi All, I'm building a CakePHP app for tracking clinic patients, their visits, their symptoms and questionnaire answers. The barrier I've encountered is that each patient has many visits AND many symptoms. I want to view the patient record and their aggregate visits and symptoms. I've defined a

Re: Validation: beforeSave and setting fields

2007-04-05 Thread Tony
Nice. That works perfectly. Thanks, - Tony --~--~-~--~~~---~--~~ 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 g

Validation: beforeSave and setting fields

2007-04-04 Thread Tony
e the content I specify. Something like: app/models/model.php: ... function beforeSave() { ... $this->invalidate('field'); $this->data['Model']['field'] = 'New content'; ... } ...but that doesn'

Re: Need help with linked tables

2007-01-10 Thread Tony Lambiris
Nevermind, I got it working. game.php was actually named games.php... sorry for the noise! --~--~-~--~~~---~--~~ 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@goo

Need help with linked tables

2007-01-09 Thread Tony Lambiris
The way my app works is I have three tables: users, systems and games. users relates to systems systems relates to games users does not relate directly to games When I am in my User controller, I want to be able to issue a command like this: $this->User->System->find("ps3") and have it return a

Re: Multiple Databases

2006-09-13 Thread Tony
;other_connection"); // Run another query $this->Model->findAll(...); // Switch back to the original database $this->Model->setDataSource("default"); connection Would that be in the View or the Controller? Would I also need to create a Mo

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread Tony
Okay I just thought of something John. If I'm doing a $hasMany in the Level model will I also need to do a $belongsTo in the Role model? Would I do the same thing and just use class Roles extends AppModel { var $name = 'Roles'; var $belongsTo = array('Level' => array('className' => 'L

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread Tony
DOH! Typo with the same key names. Okay that makes perfect sense. Dang now I'm really seeing how CakePHP can totally help me out here. And yes that REALLY helps out here. It's so sad I had to leave my office to chat on IRC because our IT department won't let me have access to an IRC channel, hav

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread Tony
John and AD7six, Did I do this correctly? class Level extends AppModel { var $name = "Level"; var $hasMany = array('Role1' => array('className' => 'Role', 'conditions' => '', 'order'

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread Tony
So I was on the right track with the URL params. I totally agree with you that cake makes things a lot easier. I read through pretty much the entire CakePHP manual, including the models chapter. Let me refocus my question. If I have those two role fields that aren't named according to convention,

Re: Migrating to Cake and Few General Questions

2006-09-11 Thread Tony
S...no one has been able to answer my question about the roles, having two fields (role1_id and role2_id) that relate to the roles table. I guess what I'm trying to ask is how do you over ride scaffolding in this situation. Is there documentation that shows me what I need to do? --~--~--

Re: Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
nate, that helps a lot. Based on the url you gave me http://site.com/posts/list/5/9 you're saying that it would be in an array(5, 9) and that to get that I would do something like $this->params['pass'][0] to get 5 and $this->params['pass'][1] to get 9? If that's correct then that's pretty easy. I

Re: Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
l thing. Ha ha ha... I dont' think I'm getting the clear pictures of how to grab the values from a url. I know in traditional PHP I can do something like this $_GET['myUrlParam'] or $_POST['formItem'] So how do I do that? Is it $this-&g

Re: Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
I was just using Chatzilla and then I tried the cakephp irc page and both disconnected me to the server. It's been such a freaking long time since I have used IRC that I'm totally rusty here. Is the server done? --~--~-~--~~~---~--~~ You received this message bec

Re: Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
insisted that it be the way it is now and now I'm getting screwed over for it. BTW what's the IRC channel? - Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To po

Re: Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
Hey AD7six, How do I grab the params from a url using cake? Here's what my database looks like: ++ + LevelID < - (Item id for conent) + ParentLevelID <- (holds an ID from LevelID that will be the parent of the child level) + Level <- (what level it is i.e 1, 2, 3, 4,

Migrating to Cake and Few General Questions

2006-09-08 Thread Tony
I'm new to Cake so I'm a bit confused on a few things after reading part of the documentation. We are a PHP shop and I'm a big fan of the homegrown framework so I turned to Cake and I like what I'm seeing. First off, how do I format and access multiple url params? For example in normal PHP we do

Re: Cake Errors I'm getting with

2006-09-06 Thread Tony
I just figured that out and came back to post that. I didn't see anything with the documentation for that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-

Cake Errors I'm getting with

2006-09-06 Thread Tony
Hey guys, I'm using CakePHP and I'm getting a few errors. I'm going through the blog tutorial and this is what is happening: Warning: file_put_contents(/www/mydomainname.com/mysite/app/tmp/cache/models/default_scribble_list) [function.file-put-contents]: failed to open stream: Permission denied

Re: Models, find/findAll and object programming

2006-09-01 Thread Tony
s important. And for the time, I will try to find some real OO solution online, like Rails. Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to c

  1   2   >