Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracted $row after a query

Status
Not open for further replies.

neilmurray

Technical User
Jan 18, 2005
32
GB
Hi,

I am running the following query

$query = "select sum(offernumber) from offers where offerprice='120'";
result= mysql_query(query);

how do I then extract this result?

Thanks,
Neil.
 
It will involve one of PHP's mysql_fetch_*() family of functions, which include mysql_fetch_array(), mysql_fetch_assoc() and mysql_fetch_object().

Take a look at the example code on the page in the PHP online manual for mysql_fetch_assoc()


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top