Where clause in php-mysql

Where cluase is used to only fetch those records that full fill a specified records

This is our where clause query with select statement

SELECT * FROM users WHERE name =”rahul” . Now this query will give all
record of rahul

Now this is our table in database and the database is test and the table name is users .

idnameageemail
1ronit Singh34raja@gmail.com
2ankit33ankit@gmail.com
3rahul11raul@gmail.com
4sharad31shar@gmail.com
5raja31raja123@gmail.com

Now i will write php code to show this table on browser with help of where clause query . As you can see there is one raja in the table so i will try to fetch it by using php-mysql .Now below is our php code

This where clause query using php code and below is our output

idnameageemail
5raja31
raja123@gmail.com

Comments 2

Leave a Reply

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