how to write nested queries
ex:

SELECT * FROM [table1] WHERE [column] IN (SELECT [column] FROM [table2])

in a function.

i tried this but MYSQL is getting stoped.
is there any alternate.

Your not really specifiying anything in your where clause. Is the value taken from table2 equal to, not equal to, less than, etc.

That query you have should work. I have just tried it on one of my databases and it ran with no problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.