Codice PHP:
<?php
/* -- Selezioniamo l'ID dell'Utente -- */
$query_id = "SELECT id FROM " . $sec . " WHERE filename = '$sourceID'";
$esegui_id = mysql_query($query_id, $conn_host) or die (mysql_error());
$estrai_id = mysql_fetch_array($esegui_id);
$id = $estrai_id['id'];
/* -- Selezioniamo il NickName dell'Utente -- */
$query_nick = "SELECT nickname FROM" . $sec . " WHERE id = '$id' ";
$esegui_nick = mysql_query($query_nick, $conn_host) or die (mysql_error());
$estrai_nick = mysql_fetch_array($esegui_nick);
$nick = $estrai_nick['nickname'];
/* -- Mostriamo l'Elimina sono se appartiene all'Utente -- */
($nick == $_SESSION['nome_utente']) ? "[url=" . $sub . "]Elimina[/url]" : "";
?>
Mi appare questo errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id = ''' at line 1
Come mai?