-
Salve sto installando uno script che richiede nl'uso di mysql.
Ho installato il tutto ed e' andata ok.
Solo che quando vado ad eseguire alcune query mi da 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 '' at line 1
La query che eseguo e':
$gId = $_GET [ gId ];
$catname= $_GET[fname];
$title= $catname;
$sql= "SELECT * FROM games where gId like '$gId'";
$rs= mysql_query($sql, $db) or die(mysql_error());
$datas = mysql_fetch_array($rs);
$swf = $datas[gSwFile];
$gId = $datas[gId];
mysql_query( " UPDATE games SET score = score + 1 WHERE gId = $gId " , $db ) or die ( mysql_error() );
$sql = "SELECT rate, comments FROM komento WHERE catid = '$gId'";
$comments = mysql_query($sql, $db) or die(mysql_error());
$rating = $datas['votes'] > 0 ? round( $datas[points] / $datas['votes'] ) : 0;Il server e' un mysql5
Se serve posso inviare anche il sql che ho usato per creare le tabelleSapreste aiutarmi?
Sto impazzendo!!
Grazie
Nello -
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi