Re: Conditions $quoteValues

2009-09-30 Thread seanislegend

Thanks VERY much for your reply, John.

$releases_ids was actually a string so all I had to do was replace
'array($release_ids)' with 'explode(",", $release_ids)'.

Again, thanks for the tip!
Cheers

On Sep 30, 1:38 pm, John Andersen  wrote:
> Ok, if I remember correctly, then you just need to change:
>
>         'Release.id' => array($release_ids)
>
> into
>
>         'Release.id' => $release_ids
>
> as $release_id is already an array!
> Enjoy,
>    John
>
> On Sep 30, 3:14 pm, seanislegend  wrote:
>
> > OK, that actually doesn't work by the looks of it :(
>
> > On Sep 30, 1:00 pm, seanislegend  wrote:
>
> > > Nevermind, got it!
>
> > > All you need to do is simply put your conditions outside of the find
> > > array in $this->conditions.
>
> > > Ch33rz!
>
> > > On Sep 30, 12:56 pm, seanislegend  wrote:
>
> > > > Hi,
>
> > > > I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> > > > dbo-source/#line-1745), but I cannot get it working at all.
>
> > > > My finder query looks like this (trimmed down):
>
> > > > $this->find('all', array(
> > > >     'conditions' => array(
> > > >         'Release.id' => array($release_ids)
> > > >     )
> > > > ));
>
> > > > $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> > > > The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> > > > and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> > > > Can anyone help, please?
> > > > Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Conditions $quoteValues

2009-09-30 Thread seanislegend

OK, that actually doesn't work by the looks of it :(

On Sep 30, 1:00 pm, seanislegend  wrote:
> Nevermind, got it!
>
> All you need to do is simply put your conditions outside of the find
> array in $this->conditions.
>
> Ch33rz!
>
> On Sep 30, 12:56 pm, seanislegend  wrote:
>
> > Hi,
>
> > I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> > dbo-source/#line-1745), but I cannot get it working at all.
>
> > My finder query looks like this (trimmed down):
>
> > $this->find('all', array(
> >     'conditions' => array(
> >         'Release.id' => array($release_ids)
> >     )
> > ));
>
> > $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> > The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> > and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> > Can anyone help, please?
> > Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Conditions $quoteValues

2009-09-30 Thread seanislegend

Nevermind, got it!

All you need to do is simply put your conditions outside of the find
array in $this->conditions.

Ch33rz!

On Sep 30, 12:56 pm, seanislegend  wrote:
> Hi,
>
> I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> dbo-source/#line-1745), but I cannot get it working at all.
>
> My finder query looks like this (trimmed down):
>
> $this->find('all', array(
>     'conditions' => array(
>         'Release.id' => array($release_ids)
>     )
> ));
>
> $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> Can anyone help, please?
> Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Conditions $quoteValues

2009-09-30 Thread seanislegend

Hi,

I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
dbo-source/#line-1745), but I cannot get it working at all.

My finder query looks like this (trimmed down):

$this->find('all', array(
'conditions' => array(
'Release.id' => array($release_ids)
)
));

$release_ids is a string of ids, such as: '1,2,3,4,5'.

The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"

Can anyone help, please?
Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Appropriate requestAction() alternative required

2009-05-15 Thread seanislegend

*bump*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Appropriate requestAction() alternative required

2009-05-15 Thread seanislegend

Hi,

the current site I'm developing has a 3 column layout. The left column
has 2 top-ten lists, the middle has the main content and the right has
a few ads and a 'featured' box.

At the moment I'm using requestAction() and caching to get the data
for the left and right hand side columns, but I know there should be a
better way of doing it.

Any tips?
Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Major Pain - retrieved data

2008-10-01 Thread seanislegend

Thanks for the suggestions.

Joel, magic_quotes_gpc is turned on. I'll try turning it off and see
if it works.

I'll let you know! Thanks.

On Oct 2, 1:34 am, Joel Perras <[EMAIL PROTECTED]> wrote:
> Have you checked that magic_quotes_gpc in your php.ini file is turned
> off?
>
> -J.
>
> On Oct 1, 5:15 pm, seanislegend <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > in the data I'm retrieving from my DB I'm still getting slashes in
> > front of quotes. I've been told before that Cake should strip these
> > automagically, but apparently not.
>
> > I'm still none-the-wiser as to what I can do for this problem. At the
> > moment I'm using a custom function on each part of the array I need
> > 'cleaned'. Obviously this is not the best way to do this, and I'd
> > rather not.
>
> > Can anyone offer any suggestions?
>
> > Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Major Pain - retrieved data

2008-10-01 Thread seanislegend

Hi,

in the data I'm retrieving from my DB I'm still getting slashes in
front of quotes. I've been told before that Cake should strip these
automagically, but apparently not.

I'm still none-the-wiser as to what I can do for this problem. At the
moment I'm using a custom function on each part of the array I need
'cleaned'. Obviously this is not the best way to do this, and I'd
rather not.

Can anyone offer any suggestions?

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Clean retrieved data.

2008-09-17 Thread seanislegend

Hi Villas, I know the basic functionality for what I'm trying to
achieve.

It's just I'd obviously rather do it nicely, with CakePHP conventions
in mind, rather then making some unneeded mess.



On Sep 15, 11:53 am, villas <[EMAIL PROTECTED]> wrote:
> Did you try this?http://book.cakephp.org/view/464/clean
>
> As a last resort,  look at basic PHP functionality. Maybe start 
> with:http://us.php.net/stripslashes
>
> On Sep 13, 7:46 pm, seanislegend <[EMAIL PROTECTED]> wrote:
>
> > Thanks for your help, I really appreciate.
>
> > Unfortunately it's still not working :( Any ideas as to what could be
> > the cause?
>
> > On Sep 13, 10:08 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
>
> > > > Thanks for the reply, Jon.
>
> > > > From what I can see, this looks like it's only useful for santizing
> > > > data for DB insertion?
>
> > > yes, though can be used for input or output. I've never had to use
> > > add/remove slashes though with cakephp, it handles that all for you.
>
> > > If you need specific functionality in the view layer, then look for
> > > and if you can't find build a 
> > > Helperhttp://book.cakephp.org/view/181/Core-Helpers
>
> > > hth
>
> > > jon
>
> > > --
>
> > > jon bennett
> > > w:http://www.jben.net/
> > > iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Save - problem!

2008-09-09 Thread seanislegend

*bump*

On Sep 8, 6:02 pm, seanislegend <[EMAIL PROTECTED]> wrote:
> I'm using the TinyMCE editor on a textarea in my CMS I'm building.
>
> A problem I've just ran into is when I add images, once saved they end
> up like this: ' height="318" />', obviously due to the way Cake treats the data before
> it's saved.
>
> Is there any workarounds for this??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Save - problem!

2008-09-08 Thread seanislegend

I'm using the TinyMCE editor on a textarea in my CMS I'm building.

A problem I've just ran into is when I add images, once saved they end
up like this: '', obviously due to the way Cake treats the data before
it's saved.

Is there any workarounds for this??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: afterDelete question

2008-09-08 Thread seanislegend

Thanks for your suggestions, I've already got it working without
afterDelete.

Thanks.

On Sep 8, 9:26 am, alkemann <[EMAIL PROTECTED]> wrote:
>         function delete($id = null) {
>                 if (!$id) {
>                         $this->Session->setFlash(__('Invalid id for Contact', 
> true));
>                         $this->redirect(array('action'=>'index'));
>                 }
>                 if ($this->Contact->del($id)) {
>                         $this->Session->setFlash(__('Contact deleted', true));
>                         $this->redirect(array('action'=>'index'));
>                 }
>         }
>
> On 7 Sep, 23:23, seanislegend <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > after I delete from a DB something I want to set a Flash message
> > saying if it's successfully been deleted or if there was an error.
>
> > I'm not sure how to implement this with afterDelete. Any ideas?
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



afterDelete question

2008-09-07 Thread seanislegend

Hey,

after I delete from a DB something I want to set a Flash message
saying if it's successfully been deleted or if there was an error.

I'm not sure how to implement this with afterDelete. Any ideas?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ORDER BY conundrum

2008-09-01 Thread seanislegend

Cheers, got it working.

On Sep 1, 8:33 am, alkemann <[EMAIL PROTECTED]> wrote:
> var $paginate = array('order' => 'name ASC, date DESC');
>
> this works fine.
>
> It may be that the pagination helper wont make a link for you, but im
> sure u can figure that out.
>
> alek
>
> On 1 Sep, 02:42, seanislegend <[EMAIL PROTECTED]> wrote:
>
> > OK, so I'm using Find to retrieve data as I need to set recursive to
> > 1.
>
> > I've got a 'filter' form on my page which allows a user to sort how a
> > bands' shows are displayed. The choices are by band name, date and
> > location and either ascending or descending.
>
> > My problem is with ordering...when the user is choosing to order by
> > band name, I want to order by 'band,date ASC' (or descending if
> > selected) - otherwise it'll be simply 'date ASC' etc.
>
> > I can't find a way to do this...any ideas?
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ORDER BY conundrum

2008-08-31 Thread seanislegend

OK, so I'm using Find to retrieve data as I need to set recursive to
1.

I've got a 'filter' form on my page which allows a user to sort how a
bands' shows are displayed. The choices are by band name, date and
location and either ascending or descending.

My problem is with ordering...when the user is choosing to order by
band name, I want to order by 'band,date ASC' (or descending if
selected) - otherwise it'll be simply 'date ASC' etc.

I can't find a way to do this...any ideas?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Changing default directories

2008-08-23 Thread seanislegend

Just had a look on the Book, and this is what I'm after (in case
anyone else may find it handy):
http://api.cakephp.org/paths_8php.html


On Aug 23, 10:43 pm, majna <[EMAIL PROTECTED]> wrote:
> fast and stupid:
> webroot/index.php
> -add at top  define ('WEBROOT_DIR', 'includes');
> -point domain documemt root to "includes"
>
> On Aug 23, 11:00 pm, seanislegend <[EMAIL PROTECTED]> wrote:
>
> > Is there any way to do this? I'd like to my CSS and JS folders from
> > the webroot to 'includes/css' etc. as this is the way I organised them
> > before I began working with Cake, and if possible I'd like to continue
> > like so.
>
> > Any suggestions?
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Changing default directories

2008-08-23 Thread seanislegend

Is there any way to do this? I'd like to my CSS and JS folders from
the webroot to 'includes/css' etc. as this is the way I organised them
before I began working with Cake, and if possible I'd like to continue
like so.

Any suggestions?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using one login function on 2 different controllers

2008-08-22 Thread seanislegend

Ah! Got it working, just realised I had to add the model name in the
input field.

Thanks for your help!

On Aug 22, 4:45 pm, seanislegend <[EMAIL PROTECTED]> wrote:
> I can indeed. It's set to "/cake/users/login".
>
> This is what's posted on the login page when I login via the home
> page:
> Array ( [_method] => POST [data] => Array ( [Home] => Array
> ( [username] => sean [password] => test ) ) )
>
> I presume I need to somehow switch that 'Home' with 'Users'??
>
> Thanks for your help!
>
> On Aug 22, 2:13 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > On Fri, Aug 22, 2008 at 6:37 PM, seanislegend
>
> > <[EMAIL PROTECTED]> wrote:
>
> > > Thanks for your suggestion. Sadly, I've already tried that and it
> > > doesn't work!
>
> > Can you elaborate on what does not work? Can you see the action of the
> > form set to users/login when you view the HTML source?
>
> > Tarique
>
> > --
> > =
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > PHP for E-Biz:http://sanisoft.com
> > =
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using one login function on 2 different controllers

2008-08-22 Thread seanislegend

I can indeed. It's set to "/cake/users/login".

This is what's posted on the login page when I login via the home
page:
Array ( [_method] => POST [data] => Array ( [Home] => Array
( [username] => sean [password] => test ) ) )

I presume I need to somehow switch that 'Home' with 'Users'??

Thanks for your help!


On Aug 22, 2:13 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 22, 2008 at 6:37 PM, seanislegend
>
> <[EMAIL PROTECTED]> wrote:
>
> > Thanks for your suggestion. Sadly, I've already tried that and it
> > doesn't work!
>
> Can you elaborate on what does not work? Can you see the action of the
> form set to users/login when you view the HTML source?
>
> Tarique
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using one login function on 2 different controllers

2008-08-22 Thread seanislegend

Thanks for your suggestion. Sadly, I've already tried that and it
doesn't work!


On Aug 22, 12:17 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 22, 2008 at 4:18 PM, seanislegend
>
> <[EMAIL PROTECTED]> wrote:
> > What I need to do is to be able to have the form on the home page be
> > able to post to the login action on the users controller so I can also
> > login from there.
>
> Set the action of the form of the home page with something like
> $form->create('user', array('action'=>'/user/login'))
>
> HTH
>
> Tarique
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using one login function on 2 different controllers

2008-08-22 Thread seanislegend

Hi,

I have a user admin section. I'm using the Auth component and in this
section I have a login action which, as you may guess, handles the
login.

I also have a login form on my home page.

What I need to do is to be able to have the form on the home page be
able to post to the login action on the users controller so I can also
login from there.

Any suggestions?

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---