Thank you answer form me, i try insert "$this->cacheQueries = false; "
select sql statement before, the results remain the same,the code
below.
'$type = "ORD"
$today = date("Ym");
$sql = "select curType,curId from orders_sequence where
curDate='$today' and type='$type'";
$row_1 = $this->findBySql($sql);
$sql = "update orders_sequence set curId = curId + 1 where
curDate='$today' and type='$type'";
$this->execute($sql);
$this->cacheQueries = false;
$sql = "select curType,curId from orders_sequence where
curDate='$today' and type='$type'";
$row_2 = $this->findBySql($sql);
2008/1/16, Takuo Shiono <[EMAIL PROTECTED]>:
>
> Hi,
>
> I think this is the effect of cache in Model class.
> Please insert the line below before execute query. This disable cache
> functionalities in Model class.
>
> $this->cacheQueries = false;
>
> Best Wishes,
>
> Takuo Shiono
>
> On Jan 15, 5:46pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > '$type = "ORD"
> > $today = date("Ym");
> > $sql = "select curType,curId from orders_sequence where
> > curDate='$today' and type='$type'";
> > $row_1 = $this->findBySql($sql);
> >
> > $sql = "update orders_sequence set curId = curId + 1 where
> > curDate='$today' and type='$type'";
> > $this->execute($sql);
> >
> > $sql = "select curType,curId from orders_sequence where
> > curDate='$today' and type='$type'";
> > $row_2 = $this->findBySql($sql);
> >
> > $row1 == $row2 ? why ?? please help me,thanks
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---