what are the common fields between the tables..
what field in wsnoweb.frontend_radio links to gateway.gateway_data
also, this statement is not valid:
The databases I need to use are gateway and wsnoweb, the tables are gateway.id, gateway.value, gateway.value_type, wsnoweb.id, wsnoweb.is_provisioned
"gateway" and "wsnoweb" are database.
id/value/value_type are part of tables gateway_data
"id", "is_provisioned" are fields of table frontend_radio.
you will need to do a join .
select gateway_data.* , frontend_radio.*
from gateway.gateway_data inner join wsnoweb.frontend_radio on gateway_data.id = frontend_radio.id
where gateway_data.value_type = 0 and (gateway_data.value > 260 or gateway_data.value < 260) and frontend_radio.is_provisioned = "false"
a) the syntax maybe a little off, i don't have the database handy, so can't fix it ( i am a Micrsoft SQL Server Syntax guy, mysql maybe a little diff )
b) i am assuming the tables related via "id" values ( probably not )
c) i assume there is a 1:1 relation, so everything is in both tables. ( if not, look @ a left or outter join )
d) you can also do a where X is in ( select id from X where xxxxxx ) sub query and not do a join.