Q:

Run few sql query with php concatenation operator

I've a html form where 3 field exist which process by PHP.   
1) Password 2) Upload Logo and 3) Tag Line field.  
So user can upload either password or logo or tag line or all field or 2 field. So that I run following query. But it's not Edit the DB. Is that ok or any suggestions of your ?
$update = mysql_query("UPDATE e_users SET email = '$email'");           
if(!empty($pass_post))
{
$update .= "pass = '$pass', salt = '$random_salt'";
}

if(!empty($logo_text))
{
$update .= "logo_text = '$logo_text'";
}

if(!empty($file))
{
$update .= "logo = '$student_pic'";
}
$update .= "WHERE uname = '$ses_user'";

Thank You. 

A:

You left out the commas when you appended additional fields to the query, and you should have a space before WHERE (not strictly necessary in this case, since all your assignments end with a quote, but it's a good idea). And you were trying to concatenate to a mysql result resource, not the SQL string.
$update = "UPDATE e_users SET email = '$email'";           
if(!empty($pass_post))
{
$update .= ", pass = '$pass', salt = '$random_salt'";
}

if(!empty($logo_text))
{
$update .= ", logo_text = '$logo_text'";
}

if(!empty($file))
{
$update .= ", logo = '$student_pic'";
}
$update .= " WHERE uname = '$ses_user'";
$result = mysql_query($update);

