Okay I'm using a MySQL database with a table called members with columns - id, member name, etc.
Say I want to get the member name from the database and store it into a variable $name. Can I do this without a loop? If so, how?
Execute a query to get the column you want using [man]mysql_query/man, then simply use [man]mysql_result/man to retrieve the data from the first row.
If there's only one name you're after (e.g. you're searching by id, which is a UNIQUE column) you could add a "LIMIT 1" at the end of your query.