multi query working; from php to sql