SQL Help

2010-01-21 Thread Pyrite
Hello, I am not very good with SQL, and I know I'm not supposed to call SQL queries directly, but I don't know the CakePHP way exactly either. What I'm trying to do is write a function that returns a list of documents that an employee needs to be trained on, rather, return the documents that an e

Re: Cake core is throwing unlink warnings

2009-02-27 Thread Pyrite
I am also getting these errors intermittently. My solution, well, on my production server I don't show warnings/errors in php.ini Seems to only see these on ajax pages with CakePHP 1.2 (latest as of 2/27/2009). On Feb 23, 2:51 pm, RyOnLife wrote: > I am getting this (and other similar) warnings

Re: Call Ajax from Javascript Function

2009-02-04 Thread Pyrite
cess) you can quickly get into > scoping problems which are tough to debug. > > Note I am a novice, but I have just been through this for a site I am > working on which is heavy ajax and blingy UI. Maybe someone can > correct me here? > > HTH, > Al. > > On Jan 28, 1:20 am,

Re: Accessing $javascript->object() results

2009-01-31 Thread Pyrite
would like to know a more basic method, either with plain javascript or prototype as that is what cake uses. On Jan 29, 4:26 pm, Pyrite wrote: > I have found many blogs talking about how you can have your controller > send to your view the results of some: > > $data = $this->MyModel

Accessing $javascript->object() results

2009-01-29 Thread Pyrite
I have found many blogs talking about how you can have your controller send to your view the results of some: $data = $this->MyModel->find('all', array('some params')); $this->set('data', $data); And then in your view: echo $javascript->object($data); Now, how the heck in the view using Javasc

Re: What is the advised way to call a function from another controller?

2009-01-27 Thread Pyrite
What about making the method static? Otherwise you can just instantiate the object, and use its methods. On Jan 27, 8:59 am, leo wrote: > On Jan 27, 3:26 pm, RichardAtHome wrote: > > > or you could put the function in your AppController > > Surely then you would either have non-generic methods

Re: Closing $ajax->form()

2009-01-27 Thread Pyrite
t; here are some options to illustrate usage: > > $form->create(); >   $form->inputs(); > $form->end('submit'); > > $ajax->form(); >   $form->inputs(); > $form->end('submit'); > > $ajax->form(); >   $form->inputs(); >   $ajax-&

Call Ajax from Javascript Function

2009-01-27 Thread Pyrite
Instead of observing a select field to make an ajax request to a controller action onchange, I want the onchange to call a custom javascript function that will do some logic and then make the ajax request to the controller and update a div afterwards. So .. how would I do that? Or, I guess i co

Re: Closing $ajax->form()

2009-01-26 Thread Pyrite
orm->create (...) >   $form->input () >   $form->input () > $form->end ('Send') > > Ajax Form: > > $ajax->form (...) >   $form->input (....) >   $form->input () > $form->end ('Send') > > On 22 Jan., 22:47, Pyrit

Re: How to submit form elements that are disabled?

2009-01-23 Thread Pyrite
- >data. Appreciate all the help! On Jan 23, 8:35 am, Pyrite wrote: > Hmmm, are you sure? I remember doing it in the past , 5-6 years ago > with PHP4, not sure how I did it then. I disabled it via Javascript > though, not xhtml. Wonder if that will make a difference. > >

Re: How to submit form elements that are disabled?

2009-01-23 Thread Pyrite
Hmmm, are you sure? I remember doing it in the past , 5-6 years ago with PHP4, not sure how I did it then. I disabled it via Javascript though, not xhtml. Wonder if that will make a difference. On Jan 23, 8:27 am, Dardo Sordi Bogado wrote: > > However I guess Cake strips it out on submission. >

Re: How to submit form elements that are disabled?

2009-01-23 Thread Pyrite
Thanks Yusuf, and Dardo. I am using another page to inject a value into the disabled form text input box, which works. However I guess Cake strips it out on submission. I just thought of another idea after Yusuf posted, I could have it disabled until they click submit and then quickly enable it a

Re: Restrict Controllers by Group

2009-01-23 Thread Pyrite
n answered > before or you can easily find the answer in google. > > > > > On Jan 21, 4:16 pm, Pyrite wrote: > >> Is there a way I can restrict controllers by group? > > >> Like $this->Auth->require('someGroup'); > > >> Otherwise,

How to submit form elements that are disabled?

2009-01-22 Thread Pyrite
I want to have a form text input get submitted, but also want it to be disabled on display. Eg. $form->input('frmInputQuantity', array('label'=>'Quantity:', 'disabled'=>'disabled')); This does not get submitted into $this->data. How can I change what gets posted to $this->data with the form help

Closing $ajax->form()

2009-01-22 Thread Pyrite
How do you put the close tag in a form created by $ajax->form() ?? Why is there not an $ajax->formEnd() similar to the FormHelper's $form->end () ? Also, when I create a form with $ajax->form(), and I add a submit with $ajax->submit(), it does not submit the form. A usage example would be great.

Re: Restrict Controllers by Group

2009-01-22 Thread Pyrite
Bump! Anyone ...? On Jan 21, 4:16 pm, Pyrite wrote: > Is there a way I can restrict controllers by group? > > Like $this->Auth->require('someGroup'); > > Otherwise, if the user is not a member of that group they don't get > access. > > Also, where do

Re: 3 ajax selects

2009-01-22 Thread Pyrite
My site only uses a 2 select, the 2nd select then shows a bunch of form input fields. The code you posted helped a lot! I would just stick with Javascript on the client end to hide things, that's what I am having to do. If Select A changes, I call javascript to just hide the form input fields unt

Restrict Controllers by Group

2009-01-21 Thread Pyrite
Is there a way I can restrict controllers by group? Like $this->Auth->require('someGroup'); Otherwise, if the user is not a member of that group they don't get access. Also, where does the information in $this->Auth->user() get set? It has the group_id but not the name of the group. --~--~-

Re: Security Notice for 1.2.0.7962, Using AuthComponent without SecurityComponent

2009-01-19 Thread Pyrite
Is there a way to test this CVE without Firefox? I do not have the option of Firefox at work. Only IE7. On Jan 16, 4:14 pm, Gwoo wrote: > After the release of 1.2 Final, we received a lot of attention. Some > of this came in the form of a security concern. The issue could affect > sites relying

Re: PHP Page inside of Cake but not Cake

2009-01-15 Thread Pyrite
php file inside the app/webroot folder. > > eg: app/webroot/bacon.php > > Then callhttp://server/bacon.php > > hth > grigri > > On Jan 15, 4:07 pm, Pyrite wrote: > > > > > Is there a way to make a plain jane custom php page and access it > > inside of

PHP Page inside of Cake but not Cake

2009-01-15 Thread Pyrite
Is there a way to make a plain jane custom php page and access it inside of the cake directory but not have CakePHP interefere with it. I am wanting to test a page and CakePHP and is screwing up the java script and I want to test the page as if CakePHP wasn't there. However, I am at work and do n

Re: Very slow response times with CakePHP

2008-12-16 Thread Pyrite
How do you index foreign keys, what does that mean? I am using Postgresql. An example with MySQL will help too. On Dec 16, 8:36 am, "Liebermann, Anja Carolin" wrote: > Hi GeneSys, > > Have you indexed your foreign keys in your database properly? For our project > that was a real performance boo

Re: 3 ajax selects

2008-11-25 Thread Pyrite
Can you please post your code :) On Nov 23, 10:50 am, haj <[EMAIL PROTECTED]> wrote: > Ok, another attempt to pull some wisdom. > > observeField is so great, it makes ajax 'just works.' > > Select A changes the content of select B on the fly beautifully, until > I have to add select C. So, select

Re: Naming a Model "Model"

2008-11-04 Thread Pyrite
Is there a list of reserved table names and/or model names? On Nov 4, 4:48 pm, Sam DeVore <[EMAIL PROTECTED]> wrote: > Bust out the thesaurus it's reserved > > === > Sent from my AT&T Rotary Phonehttp://blog.samdevore.com > > On Nov 4, 2008, at 2:54 PM,

Naming a Model "Model"

2008-11-04 Thread Pyrite
I am developing an application for a business, they have categories, products, and models. Is it a problem for CakePHP to name the database table "models" and the actual model "Model", or do I need to think of a different term? --~--~-~--~~~---~--~~ You received th