There is a task to output all data from the database by several parameters of one column.

Suppose you need to display all data from the database, in which the status parameter is 5 and 4 (without commas), these are different rows of the table!

  • > Is there a task to display all the data from the database on several parameters of one column? This is a question, is there such a problem? > let's say you need to output all data from the database, in which the status parameter is 5 and 4 (without commas), these are different rows of the table! If there is a table with a status field and you need to select all records that have either 4 or 5 in the status field, then this is a simple SELECT with WHERE: SELECT * FROM table_name WHERE status = 4 OR status = 5 - etki

1 answer 1

SELECT * FROM table WHERE status=4 OR status=5 

Displays all rows of the table with all columns in which the status = 4 or 5 field.

  • Thanks, something I felt stupid =) exactly the same. - Alexander Sizintsev 6:43 pm