Assign value from SQL to variable |
Hi guys!
I have a very simple question. I would like to assign SQL-query result (which is only 1 row and 1 column) to my variable, and when make calculations with them. This is SQL select query, which should be assigned to variable $timezone: Code: 'SELECT gtm FROM wh_rates WHERE (city_id = "'.$sity_id.'" OR city_id_en = "'.$sity_id.'") LIMIT 1' This is why I need variable $timezone (to make it clear for you): Code: $current_day = gmdate("N", time() + 3600*($timezone+date("I"))); Can anybody help me? |
Messages In This Thread |
Assign value from SQL to variable - by dmitrykanaev - 02-11-2018, 01:55 PM
RE: Assign value from SQL to variable - by php_rocs - 02-11-2018, 05:12 PM
|