You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I query the user at first (user.age = 18) $user = AdaptUserAchievementQuery::create()->findOneByUserId($user_id);
then I changed some value ($number =1 ) $sql = sprintf('UPDATE DBname SET age= age+ %u WHERE user_id = %u ', $number, $user->getUserId()); $this->con =Propel::getWriteConnection(DATABASE_NAME); $this->con->query($sql);
then I query the user again $new_user = AdaptUserAchievementQuery::create()->findOneByUserId($user_id);
well, when I print the user age and new user age both is 18, but I check the record in DB, the age has changed to 19.
the question is how can I get the new user age is 19 rather than 18?
The text was updated successfully, but these errors were encountered:
I query the user at first (user.age = 18)
$user = AdaptUserAchievementQuery::create()->findOneByUserId($user_id);
then I changed some value ($number =1 )
$sql = sprintf('UPDATE DBname SET age= age+ %u WHERE user_id = %u ', $number, $user->getUserId());
$this->con =Propel::getWriteConnection(DATABASE_NAME);
$this->con->query($sql);
then I query the user again
$new_user = AdaptUserAchievementQuery::create()->findOneByUserId($user_id);
well, when I print the user age and new user age both is 18, but I check the record in DB, the age has changed to 19.
the question is how can I get the new user age is 19 rather than 18?
The text was updated successfully, but these errors were encountered: