phpmo Posted February 19, 2010 Share Posted February 19, 2010 I'm trying to do the following but it's not working. I've gotten it to work when I do an Order By but it's not working on the BETWEEN. select field1,round(((f2+f3+f4)/3)) as newfield from table where newfield BETWEEN 2 AND 4 ORDER BY field1 asc limit 20 Quote Link to comment https://forums.phpfreaks.com/topic/192594-formula-on-several-field-then-do-a-between-possible/ Share on other sites More sharing options...
jskywalker Posted February 20, 2010 Share Posted February 20, 2010 select field1,round(((f2+f3+f4)/3)) as newfield from table ORDER BY field1 asc having newfield BETWEEN 2 AND 4 limit 20 or select field1,round(((f2+f3+f4)/3)) as newfield from table where round(((f2+f3+f4)/3)) BETWEEN 2 AND 4 ORDER BY field1 asc limit 20 Quote Link to comment https://forums.phpfreaks.com/topic/192594-formula-on-several-field-then-do-a-between-possible/#findComment-1015196 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.