problem in sql
You are viewing an old version of this question. View
the current version here.
function get_unique_categories(){ global $con; if(isset($_GET['category'])){ $category_id=$_GET['category']; $select_query="Select * from `products` where category_id='$category_id'"; $result_query=mysqli_query($con,$select_query);
Answer
There isn't enough information here to say what the error is.
Also use prepared statements to avoid SQL injection.
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.