There is a large list of lines on the site with 8 different columns, i.e.
<tr> <td>data1</td> <td>data2</td> <td>data3</td> <td>data4</td> <td>data5</td> <td>data6</td> <td>data7</td> <td>data8</td> </tr> I need to select only certain strings from the database, I know how to accept and process a post request, if at a post request the field values are all specified, but how can I accept and process a post request if the fields can always be different? For example:
When searching on a site, 8 parameters are specified, according to which there can be a selection and, accordingly, those fields that are empty (that is, no values are specified) should be ignored during a SELECT query. All that comes to my mind is to create a set of conditions (otherwise there is no knowledge)
Please tell me how to form a query to the database (SELECT) with the presence of only those fields for which the data came from the post query.