Hi I want to echo the output of query in php


$query = "SELECT COUNT(name) FROM ji where name="rahul" and age='23' ";


Can anyone plz help?

Recommended Answers

All 2 Replies

$query = "SELECT COUNT(name) [B]AS name_count[/B] FROM ji where name='rahul' and age='23' ";

With AS you can give any column a new name, making it easier to get to them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.