Why doesn't work here string concatenation?

Option 1:
Here I attached to the end of the table name through session EN or en. Here everything works fine.
about_us_val function($val) {
$result = mysql_query("SELECT * FROM about_us_".$_SESSION['lang']);
if ($val == "title") {
 while ($row = mysql_fetch_assoc($result)) {
 echo $row['title'];
}
}
elseif ($val == "description") {
 while ($row = mysql_fetch_assoc($result)) {
 echo $row['description'];
}
}
}

Option 2. Here gives a syntax error. How to set this option, $_SESSION['lang'] in sql query?
if($title || $address || $url_img || $prew_img || $maps !== "") {
 $update_stores = mysql_query("UPDATE stores_.$_SESSION['lang'] SET title = '$title', address = '$address', maps = '$maps' WHERE id = $id") or die(mysql_error());
 header("Location: /admin/admin.php?page=all_stores");
 }


This option is also not working

if($title || $address || $url_img || $prew_img || $maps !== "") {
 $update_stores = mysql_query("UPDATE stores_ SET title = '$title', address = '$address', maps = '$maps' WHERE id = $id".$_SESSION['lang']) or die(mysql_error());
 header("Location: /admin/admin.php?page=all_stores");
 }
July 2nd 19 at 13:52
1 answer
July 2nd 19 at 13:54
Solution
$update_stores = mysql_query("UPDATE stores_".$_SESSION['lang']." SET title = '$title', address = '$address', maps = '$maps' WHERE id = $id") or die(mysql_error());
Thank you. - toby commented on July 2nd 19 at 13:57

Find more questions by tags PHPMySQL