Send false as the second parameter to your query method. This will
prevent caching of the query.

On Jan 6, 5:18 pm, Gene <[EMAIL PROTECTED]> wrote:
> I have the following function being called multiple times in a
> controller:
>
>         function _link_node($lat, $lng, $line_id){
>                 $result = $this->Node->query('SELECT COUNT(*) FROM
> nodes');
>                 var_dump($result);
>                 $result = $this->Node->find("lat = $lat AND lng =
> $lng");
>                 echo "lat = $lat AND lng = $lng ";
>                 var_dump($result);
>
>                 if($result == false){
>                         $node['lat'] = $lat;
>                         $node['lng'] = $lng;
>                         $this->Node->create();
>                         $this->Node->save($node);
>                 }
>         }
>
> Neither Node->query nor Node->find can find the rows inserted by 
> Node->save... but when the script ends it all shows up in the database...
>
> can anyone shed some light into this?
--~--~---------~--~----~------------~-------~--~----~
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