How to Select a Specific Row(s) from a MySQL Table Using PHP



PHP


In this tutorial, we will show how you can select a specific row (or rows) of a MySQL table using PHP based on some criterion.

Say if you're looking for the row which contains the word "Oreos" in it or you're looking for the rows which contains prices that are under $5 or between a certain price range, you can do this also using the WHERE clause of PHP.



Below is a table of list of snack foods:

Snacks