MySQL / PHP - Display all rows from table except one single row

Dan

me again!

So I'm wondering what the sequel/php code is to display all the rows in a table except one row. So display row 1, 2, 3 and 4 and every column, but don't display anything to do with row 5. The reason for this is I want to display all users in a user table except the user that is looking at the list itself.

Checking which user is looking at the list is fine because I can use a variable I set aside called userid which can be used to check it against. I just don't know the SQL terminology I need to use to essentially "select * from table except this row".

Any help please?

damian004

What's wrong with:

SELECT * FROM `table` WHERE `id` <> 5

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

PHP MySQL: Display all column names from a given table and the values for any single given row

From Dev

MYSQL Single query to retrieve both single row from one table and many rows as a single field from another

From Dev

MySQL query - single row in one table with multiple rows in another table

From Dev

Taking ids from two rows of one MySQL table and entering those values in one row of another MySQL table using PHP

From Java

Delete all Duplicate Rows except for One in MySQL?

From Dev

MySQL: combine 2 rows from another table into a single result row

From Dev

Delete all rows, except last 10 for each client that has related row(s) in the table in one query?

From Dev

MySQL - Exclude all rows from one table if match on another table

From Dev

Mysql Trigger, Copy All Rows From One Table Into Another Table

From Dev

How to display one row when table has multiple rows related to Single record in other table?

From Dev

Mysql - Delete All except 2 rows of all post_id1 from a table

From Dev

Displaying all the rows from different columns into one single row and single column in sql

From Dev

asp.net how to remove all the rows from a table except the first one

From Dev

How to get 2 columns from one table and 2 rows as columns from other table in one row, in MySQL?

From Dev

how to select one row from one table and multiple rows from other table using joins in mysql,

From Dev

Display Store Products in Row from MySQL table (PHP)

From Dev

Retrieve all rows from table except few rows in laravel

From Dev

Copy only specific rows from one table to another in PHP and MySQL

From Dev

PostgreSQL for each row from one table join all rows from another table

From Dev

Delete all rows from MySQL table using PHP

From Dev

Select all rows from a table except where row in another table with same id has a particular value in another column

From Dev

Display each row one by one from each category one by one using php mysql

From Dev

MySQL query to update all "duplicate" rows except the latest one

From Dev

MySQL query to update all "duplicate" rows except the latest one

From Dev

How to select data from several rows in a single table in one result row?

From Dev

How to combine multiple rows from 4 tables into one single row in a new table in SQL?

From Dev

Display different rows of a record in a single row having all the column values

From Dev

Dot product of one row against all rows in a many-column mySQL table

From Dev

Dot product of one row against all rows in a many-column mySQL table

Related Related

  1. 1

    PHP MySQL: Display all column names from a given table and the values for any single given row

  2. 2

    MYSQL Single query to retrieve both single row from one table and many rows as a single field from another

  3. 3

    MySQL query - single row in one table with multiple rows in another table

  4. 4

    Taking ids from two rows of one MySQL table and entering those values in one row of another MySQL table using PHP

  5. 5

    Delete all Duplicate Rows except for One in MySQL?

  6. 6

    MySQL: combine 2 rows from another table into a single result row

  7. 7

    Delete all rows, except last 10 for each client that has related row(s) in the table in one query?

  8. 8

    MySQL - Exclude all rows from one table if match on another table

  9. 9

    Mysql Trigger, Copy All Rows From One Table Into Another Table

  10. 10

    How to display one row when table has multiple rows related to Single record in other table?

  11. 11

    Mysql - Delete All except 2 rows of all post_id1 from a table

  12. 12

    Displaying all the rows from different columns into one single row and single column in sql

  13. 13

    asp.net how to remove all the rows from a table except the first one

  14. 14

    How to get 2 columns from one table and 2 rows as columns from other table in one row, in MySQL?

  15. 15

    how to select one row from one table and multiple rows from other table using joins in mysql,

  16. 16

    Display Store Products in Row from MySQL table (PHP)

  17. 17

    Retrieve all rows from table except few rows in laravel

  18. 18

    Copy only specific rows from one table to another in PHP and MySQL

  19. 19

    PostgreSQL for each row from one table join all rows from another table

  20. 20

    Delete all rows from MySQL table using PHP

  21. 21

    Select all rows from a table except where row in another table with same id has a particular value in another column

  22. 22

    Display each row one by one from each category one by one using php mysql

  23. 23

    MySQL query to update all "duplicate" rows except the latest one

  24. 24

    MySQL query to update all "duplicate" rows except the latest one

  25. 25

    How to select data from several rows in a single table in one result row?

  26. 26

    How to combine multiple rows from 4 tables into one single row in a new table in SQL?

  27. 27

    Display different rows of a record in a single row having all the column values

  28. 28

    Dot product of one row against all rows in a many-column mySQL table

  29. 29

    Dot product of one row against all rows in a many-column mySQL table

HotTag

Archive