hey is there a way to tell a query
"SELECT * from ...
but to ignore id x and y?
SQL QUEry
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: SQL QUEry
No. You either tell it to get all (*) or specify what you want: a, b, c, etc...
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: SQL QUEry
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')- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: SQL QUEry
Ahh yes, I now see another way to interpret the question 
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.