$result = db_query("SELECT id, exp, name FROM {resubmt_users_skills} LEFT JOIN {resubmt_skill_ids} USING (id) WHERE resubmt_users_skills.uid = :uid", array(':uid' => $user.uid))->fetchAssoc();

That should work just fine and doesn't require the overhead of dynamic queries. I'm not too sure about the fetchAssoc() because I don't bother with array results any more.

See http://drupal.org/node/310072
 
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.


From: Kamal Palei


Thanks Nicolas
Tried your suggestion. It worked. Thanks.
 
Nancy, I did not understand your comment "do not convert select query", can you kindly elaborate on it.