Re: Behavior afterFind not filtering data?

2010-07-31 Thread Dr. Loboto
> I've discovered this because I'm attempting to run batches through the > Console. So, I'm only using a Shell script and the Model in question > and I'm definitely getting "?" where I should be getting ™. I've > verified that my database.php file is using 'encoding'  => 'iso-8859-1' > and that my

Re: Behavior afterFind not filtering data?

2010-07-31 Thread cricket
On Fri, Jul 30, 2010 at 11:03 AM, DragonFlyEye wrote: > Ok, the problem appears to be that somewhere in the bowels of > CakePHP's Models, it doesn't seem to like certain characters and just > replaces them with "?" > > I've discovered this because I'm attempting to run batches through the > Consol

Re: Behavior afterFind not filtering data?

2010-07-30 Thread DragonFlyEye
Ok, the problem appears to be that somewhere in the bowels of CakePHP's Models, it doesn't seem to like certain characters and just replaces them with "?" I've discovered this because I'm attempting to run batches through the Console. So, I'm only using a Shell script and the Model in question and

Re: Behavior afterFind not filtering data?

2010-07-22 Thread DragonFlyEye
Not really. We're talking about thousands of products for a start. And I expect to have problems with data entry in the future, like cutting and pasting from Word. Plus there is some resistence to changing things around here that I've got to slowly overcome. In the meanwhile, I have to be able to s

Re: Behavior afterFind not filtering data?

2010-07-22 Thread cricket
You haven't said what results you're seeing. Anyway, at a glance, I can see one problem. Sanitize::clean($results); should be: $results = Sanitize::clean($results); But, wouldn't it be simpler to just write a script that cleans up the DB once and forget about it? On Thu, Jul 22, 2010 at 2:06 P

Behavior afterFind not filtering data?

2010-07-22 Thread DragonFlyEye
I'm sure I'm missing something silly, but I cannot get this Behavior to work. I've got data with a bunch of nasty characters in the database that I need to avoid or escape before presenting to the browser. Also, it's got a lot of white space at the end of much of the data because someone erroneousl

Re: Re: Filtering Data

2006-08-19 Thread Samuel DeVore
Oh I use it too, I just try to avoid it because I don't want to create too many dependancies to a particular DB engine, it is far too easy for me to put mysql specific syntax in there then I loose the portability that a database abstraction layer buys me. Now if I was very instinctive about usin

Re: Filtering Data

2006-08-19 Thread [EMAIL PROTECTED]
sam D, "really you want to avoid the custom sql (using ->query) as much as possible" Why? That method seems to work fine. I use query(). Please elaborate. Ralph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ca

Re: Filtering Data

2006-08-18 Thread c_doug
Btw, the above example worked. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [

Re: Filtering Data

2006-08-18 Thread Mikee Freedom
what about the HABTM associations., is there an easy method to filter information based on values in the join table? e.g. User and Group models using groups_users function index() { $conditions = array('Group.id' => 2); $this->data = $this->User->findAll($conditions); } On 1

Re: Filtering Data

2006-08-18 Thread Samuel DeVore
array('Post.category_id'=>$id,'Post.author'=>'me')   you can also have >, < and stuff like that just put it like   'Post.category_id'=>'< ' + $idfor a strange one.really you want to avoid the custom sql (using ->query) as much as possible IMHO  read the manual section on model for more information 

Re: Filtering Data

2006-08-18 Thread c_doug
Thanks, I'll try that as soon as I get a chance. Can you please tell me how (or if it is possible) to have multiple conditions in the array? Similar to: WHERE category_id = 1 AND author = 'me'. Also at what point of complexity or when is it just better to use SQL in your model? --~--~-~

Re: Filtering Data

2006-08-18 Thread Samuel DeVore
theview. Should I be using something other than read() or findAll()? Cananyone point me to a good source of info for filtering data? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post

Filtering Data

2006-08-18 Thread c_doug
ightly: function cat($id) { $this->Post->category_id = $id; $this->set('data', $this->Post->findAll()); } but it is still pulling up all records when using php foreach in the view. Should I be using something other than read() or findAll()? Can anyone po