You could always write a custom sql script to do what you want to do:

$sql="SELECT * FROM something AS somethingelse WHERE conditions";
$results = $this->yourmodel->query($sql);

You could also have your ajax call submit a form with a hidden input
that contains the id of the call, that way you can differentiate in
your controller which ajax call was used. If you need to differentiate
in your view, just pass that data back to your view.

Dave

On Jan 17, 9:26 am, papajoe <[EMAIL PROTECTED]> wrote:
> I'm using Ajax calls from the same table and field twice in the same
> form. To differentiate between the two ajax call, the [modelname]
> [fieldname] needs to be different. Since I can't change the way the
> Ajax method makes the call, I though I'd use beforeFind in the model
> to return "SELECT fieldname AS tempname WHERE...".
>
> Ex.
>
> SQL in:
>
> select [temp_url] from links where id=3;
>
> SQL out;
>
> select [url] as [temp_url] from links where id=3;
>
> So the Ajax call would look for temp_url (non-existant) and the return
> value would be that of url.
>
> Possible?
--~--~---------~--~----~------------~-------~--~----~
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