Ankita Kumari

Ankita Kumari

  • NA
  • 82
  • 12.5k

minimization of mysql query

Dec 16 2021 11:24 AM

SELECT * FROM bussiness_setting WHERE `start`>=(SELECT DATE_FORMAT(CONVERT_TZ(NOW(),
(SELECT `diff` FROM `timezones` WHERE `abbr_full`= (SELECT @@system_time_zone)),
(SELECT `diff` FROM `timezones` WHERE `abbr`='CT')),'%h:%i %p')) AND `end` >=(SELECT DATE_FORMAT(CONVERT_TZ(NOW(),
(SELECT `diff` FROM `timezones` WHERE `abbr_full`= (SELECT @@system_time_zone)),
(SELECT `diff` FROM `timezones` WHERE `abbr`='CT')),'%h:%i %p')) AND iduser=2

please minimize this query??