+ Start a Discussion
vishal yadav 62vishal yadav 62 

how to write a soql query php to apex class

Hi ,
i'm trying to write a query php to apex classess , but i'm getting error can any one help me out..asap.
my query is like this type in php --i want to this query in apex class.

SELECT `l`.`city`, `l`.`pref_dlr1`, `l`.`pref_dlr2`, `l`.`pref_dlr3`, `d`.`name`, `d`.`dlrid`, 
`d`.`state` AS `dlr_states`, `d`.`city` AS `dlr_city`, `d`.
`ud_dlrid`FROM `jud_city_list` `l`JOIN `jud_dlr_list` `d` ON `d`.
`dlrid` IN (l.pref_dlr1,l.pref_dlr2,l.pref_dlr3)WHERE `l`.`city` LIKE 'm%' ESCAPE '!'ORDER BY `l`.
`city` ASC


l-city list
d- dlr locator