Hi,
I've been using code like this in order to select one field's value:
$query = "SELECT password FROM mail_list WHERE user_id = $login";
$query_result = mysql_query($query) or die("Error in query:".mysql_error());
while ($query_row = mysql_fetch_array($query_result)) {
$db_password = $query_row[0];
}
I'd like to not have to use that 'while' section of code and just get directly at the password's value.
Also, sometimes it seems like I need to use a query like (login variable has single quote, double quote, then dot in before and after it):
$query = "SELECT password FROM mail_list WHERE user_id = '".$login."'";
in order for my queries to work.
Thanks
Chris