xwishmasterx Posted April 30, 2011 Share Posted April 30, 2011 I have this part of an UPDATE code this seems to return a value no matter what I set it too: AND team_treasure>=((members_count)*1000) although members_count times 1000 is much higher than team_treasure it still returns as if it is equal or lower. Can someone help me on how to write this simple calculation? Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/ Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 AND team_treasure>='members_count * 1000' Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208658 Share on other sites More sharing options...
PFMaBiSmAd Posted April 30, 2011 Share Posted April 30, 2011 What is the data type of your team_treasure and members_count columns? Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208675 Share on other sites More sharing options...
Pikachu2000 Posted April 30, 2011 Share Posted April 30, 2011 AND team_treasure>='members_count * 1000' That would make 'members_count * 1000' a string. Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208711 Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 my mistake...remove the single quotes then Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.