On Jan 6, 8:18 am, 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?
in 1.1 query results are cached .. unless you disable it by setting
this var:
http://api.cakephp.org/model__php5_8php-source.html#l00180
to false.
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
-~----------~----~----~----~------~----~------~--~---