Batman64 3 Posted September 6, 2015 Boas galera estou a configurar o item shop do meu site mais quando compro o item aparece essa mensagem Duplicate entry '4294967295' for key 'PRIMARY 1 Blackout reacted to this Share this post Link to post Share on other sites
0 igoriap 4 Posted September 6, 2015 codigo do php ta errado .. 1 Blackout reacted to this Share this post Link to post Share on other sites
0 Batman64 3 Posted September 7, 2015 Onde esta errado ajude-me 1 Blackout reacted to this Share this post Link to post Share on other sites
0 Batman64 3 Posted September 7, 2015 codigo do php ta errado .. Me ajuda manow onde é 1 Blackout reacted to this Share this post Link to post Share on other sites
0 Blackout 28 Posted September 7, 2015 codigo do php ta errado .. Também sofro com esse erro, poderia me ajudar? <div id="con-top">Loja de Itens</div> <div id="con-mid"> <?PHP function canBuy() { if(!isset($_SESSION['nextBuy'])) { $_SESSION['nextBuy']=time(); } if($_SESSION['nextBuy']<=time()) { $_SESSION['nextBuy']=time()+5; return true; } else return false; } if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) { echo'<h2>Loja de Itens</h2>'; if(isset($_GET['id']) && checkInt($_GET['id'])) { $sqlCmd="SELECT vnum, preis, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2 FROM ".SQL_HP_DB.".is_items WHERE id='".$_GET['id']."' AND anzeigen='J' LIMIT 1"; $sqlQry=mysql_query($sqlCmd,$sqlHp); if(mysql_num_rows($sqlQry)==1) { $getItem=mysql_fetch_object($sqlQry); $sqlCoins = "SELECT coins FROM account.account WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1"; $qryCoins = mysql_query($sqlCoins,$sqlServ); $getCoins = mysql_fetch_object($qryCoins); if(canBuy()) { if(($getCoins->coins)>=$getItem->preis) { $getGroesse = compareItems($getItem->vnum); $belPos = checkPos($_SESSION['user_id']); $possiblePos = findPos($belPos['islager'],$getGroesse['groesse']); if(!empty($possiblePos)) { $nCoins = $getCoins->coins-$getItem->preis; $sqlCmd="UPDATE account.account SET coins='".mysql_real_escape_string($nCoins)."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1"; $sqlQry=mysql_query($sqlCmd,$sqlServ); $sqlLog="INSERT INTO ".SQL_HP_DB.".is_log (account_id,vnum,preis,zeitpunkt) VALUES ('".mysql_real_escape_string($_SESSION['user_id'])."','".$getItem->vnum."','".$getItem->preis."','".$sqlZeit."')"; $qryLog=mysql_query($sqlLog,$sqlHp); $sqlItem="INSERT INTO player.item (owner_id,window,pos,count,vnum,attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2) VALUES ('".mysql_real_escape_string($_SESSION['user_id'])."','MALL','".$possiblePos[0]."','1','".$getItem->vnum."','".$getItem->attrtype0."', '".$getItem->attrvalue0."', '".$getItem->attrtype1."', '".$getItem->attrvalue1."', '".$getItem->attrtype2."', '".$getItem->attrvalue2."', '".$getItem->attrtype3."', '".$getItem->attrvalue3."', '".$getItem->attrtype4."', '".$getItem->attrvalue4."', '".$getItem->attrtype5."', '".$getItem->attrvalue5."', '".$getItem->attrtype6."', '".$getItem->attrvalue6."', '".$getItem->socket0."', '".$getItem->socket1."', '".$getItem->socket2."')"; $qryItem=mysql_query($sqlItem,$sqlServ) or die(mysql_error()); echo'<p class="meldung">O item foi comprado com sucesso. Caso ocorra erro entre em contacto com a Administração o mais rapido possível.</p>'; } else { echo'<p>Você não tem espaço suficiente no seu armazenamento loja de itens.</p>'; } } else { echo'<p class="meldung">Você não tem On3Coins suficientes.</p>'; } } else { echo'<p class="meldung">Só é permetido comprar um item de 5 (cinco) em 5 (cinco) Minutos</p>'; } } else { echo'<p class="meldung">O item especificado não existe.</p>'; } } else { echo'<p class="meldung">Ocurreu um Erro, Por favor entre em contacto com a Administração.</p>'; } echo'<p><a href="javascript:history.back()">Voltar Atrás</a></p>'; } else { echo'<p class="meldung">Você precisa estar logado para esta área.</p>'; } ?> </div> <div id="con-bot"></div> Share this post Link to post Share on other sites
0 Batman64 3 Posted September 7, 2015 esse teu codigo funfa man? Share this post Link to post Share on other sites
Boas galera estou a configurar o item shop do meu site mais quando compro o item aparece essa mensagem Duplicate entry '4294967295' for key 'PRIMARY
Share this post
Link to post
Share on other sites