Lida 5762 vezes
<?phpinclude ("config.php");$id = $_GET['id'];$date = date("Y,m,d,h,i,s");$sql = mysql_query("SELECT * FROM wap_live_top WHERE id = '$id' "); while($row = mysql_fetch_array($sql)) { $link = $row['link']; $out = $row['out'] + 1; $total = $row['total'] + 1; }mysql_query("UPDATE wap_live_top SET out='$out', total='$total', lastout='$date' WHERE id='$id'")or die(mysql_error());header("Location: $link");exit;?>
O problema está na sintaxe que escreves-te para inserir os dados.Tenta colocar as coisas separadamente e em vez de teres virgulas teres "and" lol..é 1 ideia.mysql_query("UPDATE wap_live_top SET out = '$out' and total = '$total' and lastout = '$date' WHERE id = '$id'") or die (mysql_error()); Não sei se será disto, mas ele não está a reconhecer..
// HITS IN$date = DATE("Y,m,d,h,i,s");$sql = mysql_query("SELECT * FROM wap_live_top where id = '$id' "); while($row = mysql_fetch_array($sql)){ $id = $row['id'];$in = $row['incoming'] + 1;$total = $row['total'] + 1;}mysql_query("UPDATE wap_live_top SET incoming='$in', total='$total', lastin='$date' WHERE id='$id' ")or die(mysql_error());//......}
Joomla
PHP
Desenvolvimento