I do a sample of the database

$vib = mysql_query("SELECT * FROM `vibor` WHERE `category` = '2' ORDER BY `id` ASC"); 

Displays all articles with category = 2 .
Under such articles there is an article with id = 15 .
How to exclude it from this list without changing the value category = 2 for it?

    1 answer 1

     SELECT * FROM `vibor` WHERE `category` = '2' AND `id` <> '15' ORDER BY `id` ASC 

    Description of comparison operators

    • one
      Thank you very much. only where id needs such quotes `` otherwise it does not work) - iKey
    • @ Denis, thank you, corrected. - Andrey Kurulyov