Added gallery sql