我无法使MySQL Source值等于$ source:
$result = mysql_query("SELECT Source FROM videos
WHERE Name='$name'");
$source=['Source'];
答案 0 :(得分:0)
$result = mysql_query("SELECT Source FROM videos WHERE Name='$name'");
$ds = mysql_fetch_object($result);
$source= $ds -> Source;
这样做,但你应该使用mysqli
答案 1 :(得分:0)
$sql = "SELECT Source FROM videos WHERE Name = '$name'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$your_var = $row['Source'];