ziedinjsh Posted November 18, 2016 Report Share Posted November 18, 2016 (edited) Sveiki, jau kādu brīdi meiģinu apdeitot datubāzi tā lai lietotājam pieskaitītu +1 pie punktiem, bet neizdodās.Datubāzē tips norādīts kā INT.Esmu izmeiģinājis visādīgi bet pirmajā reizē pievieno tikai 1 un vairāk neskaita klāt, kapēc tā? $add_points = ORM::for_table('users')->find_one($me->id); $add_points->set('points', '+1'); $add_points->save(); $add_points = ORM::for_table('users')->find_one($me->id); $add_points->set('points', 'points +1'); $add_points->save(); $add_points = ORM::for_table('users')->find_one($me->id); $add_points->set('points', 'points' +1); $add_points->save(); Edited November 18, 2016 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
Val Posted November 18, 2016 Report Share Posted November 18, 2016 https://github.com/j4mie/idiorm/issues/101 Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2016 Author Report Share Posted November 18, 2016 Paldies!man izdevās arī šādi $add_points = ORM::for_table('users')->find_one($me->id); $add_points->points = $add_points->points+1; $add_points->save(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.