http://www.sonicdream.it/main/index.php
ok guardate qui. mi continua ad uscire quello stupido errore sql nonostante funzioni tutto bene.
mySQL query error: UPDATE ibf_sessions SET
il punto è che questo sta nel 1 database, mentre lo script che provoca l'errore nel 2 (premetto che ho fatto la connessione al DB correttamente, infatti funziona).
è come se cercasse di dare quell'istruzione al DB2 anzichè il 1 (cosa che accade solo in presenza di sto script). nesusno mi sa dire come mai? la cosa VERAMENTE strana è che l'errore mi esce SOLTANTO se metto lo script nella tabella, provando a metterlo fuori funziona tutto come si deve..![]()
codice:<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse"> <tr> <td><div align="center"><?php include('latestfic.php'); ?></div></td> </tr> </table></td>codice:<?php /* BakaFic 0.9 */ // Gestione fiction per Sonic Dream //echo " Accesso al database</p>"; $conn = mysql_connect("xxx", "xxx", "xxx"); //conn = mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root'); if (!$conn) die("Impossibile connettersi"); //echo " Connessione effettuata, accedo al DB</p>"; $db = mysql_select_db("xxx"); if (!$db) die(" Impossibile selezionare il database</p>"); $sql_latest = 'SELECT * FROM `bakafic_fictions` ORDER BY `id` DESC LIMIT 1'; $result_latest = mysql_query($sql_latest); if (!$result_latest) die ("Errore nella query"); if (mysql_num_rows($result_latest) > 0) { while ($row_latest = mysql_fetch_array($result_latest)) { echo "<a href=\"index.php?viewfic=1&id=" .$row_latest[id]. "\">" .$row_latest[title]. "</a> di " .$row_latest[author]. " - Letta " .$row_latest[counter]. " volte "; } } ?>

Rispondi quotando
