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!

Get field value

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I am using PHP with MySql. I have a statement:

$sql = "select * from Validnames where UserID = '$UID' && Location = '$Location'";

Am I correct this gets a single matching row of data from the database. If so, how do I pull out the value of 1 of the fields in the row. (2nd column)

Sorry if this is more PHP but its half and half.

Thanks

Regards

 
your query may or may not get a single row -- it depends on how many rows actually have those values in the UserID and Location columns

how you pull the value of the 2nd column? that's a php question

:)

r937.com | rudy.ca
 
Thanks for the reply. There should only be 1 row meeting the criteria. I will look at it from a PHP angle. Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top