How can i do fitering by doing php coding, if i want to filter something like city from mysql data base? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i do fitering by doing php coding, if i want to filter something like city from mysql data base?

For an example: there are many e-commerce platform where people sell pre-owned things. Now suppose a buyer wants to buy a pre-owned product from seller or same city. so simply the buyer is going to search the product by applying filter i.e, choosing city and product that he wants by choosing from selector placed upside of the page. How this process works ? how by selecting a city can show products available from that city? how can i connect selector in this manner to the mysql db? please help me..

22nd Oct 2018, 2:07 AM
Tara Prasad
Tara Prasad - avatar
1 Answer
+ 1
Do you mean like this: SELECT * FROM tableName WHERE cityColumn = '$varForUserchoosenCity';
23rd Oct 2018, 8:23 AM
Function
Function - avatar