Maracles Posted November 7, 2009 Share Posted November 7, 2009 Hi, I have the following MySQL query, is there anyway of simplifying this? $query = "UPDATE gross SET day1 = $day1new, day2 = $day2new, day3 = $day3new, day11 = $day11new, day5 = $day5new, day6 = $day6new, day7 = $day7new, day8 = $day8new, day9 = $day9new, day10 = $day10new, day11 = $day11new, day12 = $day12new, day13 = $day13new, day14 = $day14new, day15 = $day15new, day16 = $day16new, day17 = $day17new, day18 = $day18new, day19 = $day19new, day20 = $day20new, day21 = $day21new, day22 = $day22new, day23 = $day23new, day24 = $day24new, day25 = $day25new, day26 = $day26new, day27 = $day27new, day28 = $day28new where filmID = 5"; Quote Link to comment https://forums.phpfreaks.com/topic/180619-simplfying-a-query-help-needed/ Share on other sites More sharing options...
oni-kun Posted November 7, 2009 Share Posted November 7, 2009 You could use a FOR loop for the 1-24 there, should be simple enough. Otherwise there's nothing you can really simplify. Quote Link to comment https://forums.phpfreaks.com/topic/180619-simplfying-a-query-help-needed/#findComment-952942 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.