Try this:
$result_2=mysql_query("select agents.aid from agents where agents.verify='Y' and agents.suspend='N' and agents.aid in(select agentcity.aid from agentcity where agentcity.city ='".$row_1[\"city\"]."' and agentcity.quote like '%".$h.",%') ",$connection);
Try to echo back the sql statment and try it in the mysql command line to see if it works.
Simon
Hitesh Patel wrote:
Hi there,
I have a problem when i am using relational query.
Please tell what may be the reason?
query is on line no. 93 in my program:
=============== QUERY ======================
$result_2=mysql_query("select aid from agents where verify='Y' and suspend='N' and aid in(select aid from agentcity where city ='".$row_1["city"]."' and quote like '%$h,%') ",$connection);
then i am getting a warning
"Supplied Argument is not valid mysql result resource on line 93"
if you can find, send me the reply.
Yours sincerely,
Hitesh Patel.