Ammending mysql to use query over run