دنبال کننده ها

۱۳۹۶ آبان ۱۲, جمعه

MySQL update queryis not working for varable table name, column, row for inserting a value at that particular position?

[ad_1]

Here is my php code. This update query is not working. I'm naïve in php, can anyone help??



 <?php
include "connect.php";

$table_name="CO208#";
$date = "3-11-2017";
$faculty = "15PEB203";
$value = "0";

$sql = "UPDATE $table_name SET $faculty = '$value' WHERE Date = '$date.'";

$result = mysqli_query($con,$sql);
if($result)
echo "1";

else
echo "0";
?>


[ad_2]

لینک منبع