SQL QUEry
Posted: Mon Jan 10, 2011 1:57 pm
hey is there a way to tell a query
"SELECT * from ...
but to ignore id x and y?
"SELECT * from ...
but to ignore id x and y?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
another way to read and answer your question ... if your table has several columns and one of them is named "id" and you want to exclude the rows where "id" is either "x" or "y" then the answer is yes... you can exclude them in this way:webdzine wrote:is there a way to tell a query
"SELECT * from ...
but to ignore id x and y?
Code: Select all
SELECT * FROM <your_table>
WHERE id NOT IN ('x', 'y')