Salve nel seguente script ricevo i seguenti 2 errori:
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given line 14
Undefined variable: name 19
Grazie dell'aiuto.
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given line 14
Undefined variable: name 19
Grazie dell'aiuto.
PHP:
<?php
/**
* Created by PhpStorm.
* User: jakublemiszewski
* Date: 24/10/14
* Time: 21:03
*/
require_once 'dbConnection.php';
if (isset($_GET['id'])) {
$id = $_GET['id'];
$query = mysql_query("SELECT * FROM 'video' WHERE id='$id'");
while ($row = mysql_fetch_assoc($query))
{
$filename = $row['filename'];
$url = $row['url'];
}
echo 'You are whacking video' .$filename. '<br>';
echo '<embed src="$url" width="560" height="315"></embed>';
}else
{
echo 'error';