Ok, as it turns out, the array that AD7six suggested did not work for
me personally with or without addslashes(), magic quotes on or off or
any variation therein.  That is not to say that it doesn't work, it
just did not make a correct comparison for my purposes.

On the other hand, bernardo, your suggestion did work and it works
flawlesly as I had wanted.  I get 0 double entries out of 30000
records.  I went ahead and left magic_quotes on for now.  I like not
having to deal with it.  Funny thing is, when I turned it off and used
cake to do my save without sanitizing for SQL, MySQL took the data,
apostrophes, ampersands and all without me having to specifically
addslashes before the save.  I am guessing cake does this
automagically when I call save().

Thanks a million for your help (both of you!)  Now for my second
question that i am not too clear on.  I have searched this group for
information on saving HABTM.  From what I have above, I have a
classifieds_editions and a categories_classifieds.

>From what I can gather from other posts, am I supposed to do?

$this->data['Edition']['Edition']['classified_id'] = (integer)$this-
>xmlID;
$this->data['Edition']['Edition']['edition_id'] = (integer)$ad-
>editions;


I am pretty confused on this part.  Like I said, I have read the
manual, looked at the API checked this group and google.  I am at a
loss.

On Feb 28, 3:28 am, "bernardo" <[EMAIL PROTECTED]> wrote:
> On Feb 28, 7:50 am, "AD7six" <[EMAIL PROTECTED]> wrote:
>
> > On Feb 28, 10:15 am, "Christopher E. Franklin, Sr."<[EMAIL PROTECTED]> 
> > wrote:
> > > I will try that as well.  I thought that's what the sanitize->sql()
> > > did
> > > .  Maybe I am mistaken.
>
> > If you use a string constraint, you are basically on your own from
> > cake's perspective. If you use an array constraint, cake should take
> > care of it for you. I bet this works, or at the very least does not
> > generate errors:
>
> > $this->matchResult = $this->Classified->findCount(array(
> > "Classified.text" = $ad->text,
> > "Classified.editions" => $ad->editions)
> > );
>
> I don't think this works because it cuts the string at the first
> newline.
>
>
>
> > HTH,
>
> > AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to