Unknown column in where clause
MySqli / Php

Unknown column in where clause

Are you getting unknown column in where clause ? If yes then here is the solution. May be you forgot to use single quote before and after your variable.

Try the given code and change table, column names accordingly.

$query="select * from students where regd_no='".$enrollment_no."' ";

Thanks for visiting.


I am a Full Stack Web Developer. I have more than 8 years of experience in the web design and development industry.

Leave a Reply

Your email address will not be published. Required fields are marked *