> Hi All
> I am trying to write a sql query in D7.
>
>
> SELECT id, exp, name FROM {resubmt_users_skills} LEFT JOIN
> {resubmt_skill_ids} USING (id) WHERE resubmt_users_skills.uid = $user.uid
>
> The above query I want to write in D7.
>
> $query = db_select('resubmt_users_skills' , 'us');
> $query->leftJoin('resubmt_skill_ids' , 'si');
> $query->condition('USING(id)');
> $query->condition('us.uid = :uid' , array(':uid' => $user->uid));
> $result = $query->execute()->fetchAssoc();
>
> Looks above syntaxt is not correct. Can somebody pls tell me whats the
> fault here and solution for that.
Try out this syntax :