elkumanes
-
Contador contenido
12 -
Ingreso
-
Última visita
Mensajes publicados por elkumanes
-
-
hola amigos estoy implementando una item-sho pero a la hora de hacer la compra me da un error este es el codigo
ESTE ES EL ERROR QUE ME DA
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '='40' WHERE owner_id='2'' at line 1 in C:\xampp\htdocs\item_shop\sayfalar\urun-satinal.php:8 Stack trace: #0 C:\xampp\htdocs\item_shop\sayfalar\urun-satinal.php(8): PDOStatement->execute(Array) #1 C:\xampp\htdocs\item_shop\index.php(195): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\item_shop\sayfalar\urun-satinal.php on line 8
no se mucho de de PDO por favor sean lo mas claro que puedan gracias........
ESTA ES LA PAGINA urun-satinal.php
QuoteESTA ES LA PAGINA urun-satinal.php
<?php !defined("index") ? die (header('location: ../index.php?getir=404')) : null; ?>
<?php
sleep(1);
if (isset($_GET['id'])) {
$id = trim($_GET['id']);$canta = $vtOyun ->prepare("SELECT * FROM player.item pos=:po WHERE owner_id=:ow");
$canta ->execute(array("ow"=>$_SESSION['id'], "po"=>40));
$bastirCanta = $canta->fetch(PDO::FETCH_ASSOC);if (!$id) {
header("location: index.php?getir=404");
exit();} else {
if (HesapDetayCek("coins") < indirimci(urunDetayi("item_fiyat"), urunDetayi("item_indirim")) AND urunDetayi("item_odeme_turu") == "EP") {
EPYOK();} elseif(HesapDetayCek("jcoins") < indirimci(urunDetayi("item_fiyat"), urunDetayi("item_indirim")) AND urunDetayi("item_odeme_turu") == "EM"){
EMYOK();} elseif($bastirCanta['pos'] > PozisyonBulucu()){
echo "nesne market deponuzda yeteri kadar alan yok.";} elseif(!urunDetayi("item_kodu")){
header("location: index.php?getir=404");
exit();} else {
//itemin kodunu çeker
$itemkodu= urunDetayi("item_kodu");
//itemin kaç adet alınacağı bilgisini çeker
$adet = urunDetayi("item_adet");
//nesne market deposundaki boşta olan pozisyonu çeker
$pozisyon = PozisyonBulucu();$itemEkle = $vtOyun->prepare("INSERT INTO player.item SET
window=:w,
owner_id = :oi,
count=:c,
vnum=:v,
pos=:p
");
$sonuc = $itemEkle->execute(array(
'w'=>'MALL',
'oi'=>$_SESSION['id'],
'c'=>$adet,
'v'=>$itemkodu,
'p'=>$pozisyon
));
//13.12.2019 item satın alınma sayısını +1 arttıran fonksiyon
sevilenUrun(urunDetayi("item_id"));
//sipariş geçmişini oluşturan fonksiyon
siparisGecmisi();
if(urunDetayi("item_indirim") > 0 AND urunDetayi("item_odeme_turu") == "EP"){
$sex = HesapDetayCek("coins")-(indirimci(urunDetayi("item_fiyat"), urunDetayi("item_indirim")));
$sex2 = HesapDetayCek("jcoins")+(indirimci(urunDetayi("item_fiyat"), urunDetayi("item_indirim")));
$MiktarSil = $vtOyun ->prepare("UPDATE account.account SET coins=:co, jcoins=:jo WHERE login=:lo");
$MiktarSil->execute(array(
"co"=>$sex,
"jo"=>$sex2,
"lo"=>$_SESSION['login']
));} elseif(urunDetayi("item_indirim") > 0 AND urunDetayi("item_odeme_turu") == "EM"){
$sex2 = HesapDetayCek("jcoins")-(indirimci(urunDetayi("item_fiyat"), urunDetayi("item_indirim")));$MiktarSil = $vtOyun ->prepare("UPDATE account.account SET jcoins=:jo WHERE login=:lo");
$MiktarSil->execute(array(
"jo"=>$sex2,
"lo"=>$_SESSION['login']
));} elseif(urunDetayi("item_odeme_turu") == "EP"){
$sex = HesapDetayCek("coins")-(urunDetayi("item_fiyat"));
$sex2 = HesapDetayCek("jcoins")+(urunDetayi("item_fiyat"));
$MiktarSil = $vtOyun ->prepare("UPDATE account.account SET coins=:co, jcoins=:jo WHERE login=:lo");
$MiktarSil->execute(array(
"co"=>$sex,
"jo"=>$sex2,
"lo"=>$_SESSION['login']
));} elseif(urunDetayi("item_odeme_turu") == "EM"){
$sex = HesapDetayCek("jcoins")-(urunDetayi("item_fiyat"));
$MiktarSil = $vtOyun ->prepare("UPDATE account.account SET jcoins=:jco WHERE login=:lo");
$MiktarSil->execute(array(
"jco"=>$sex,
"lo"=>$_SESSION['login']
));}
if ($sonuc) {
/*echo urunDetayi("item_adet")." x";
echo " ".urunDetayi("item_adi");
echo " ".urunDetayi("item_fiyat");
echo urunDetayi("item_odeme_turu")." 'e";
echo " satın alındı."."<br>";*/TAMAM();
} else {
$row = $itemEkle->errorInfo();
echo $row[2];
}
}}
}?>
-
pero en que archivo se ve eso
-
hola muy buenas tardes, noches o día vengo aca para ver si me echan una mano con este problemita que tengo al escrbir en el chat la letra inicial no sale se borra si pongo hola sale en pantalla ola.
Debes iniciar sesión para ver el contenido del enlace en esta publicación. -
hace 3 horas, barbera69 dijo:
sorry por el doble post pero por tamaño no me dejo en 1,
tambien modifique logo de staff y mas cosas.
Debes iniciar sesión para ver el contenido del archivo adjunto en esta publicación.si se puede ir a chunjo la cuestión es crear personajes que pertenezcan al reino de chunjo
-
hace 1 hora, barbera69 dijo:
Tienes razon ,pero con ese cliente tambien se puede .ya que solo esta deshabilitado del cliente no del server, asi que modificando dos cositas ,funciona.
un saludo barbera69.
pero que 2 cosita modifico
-
como activo el reino chunjo estoy poniendo el comando /enable 1 /enable 2 /enable 3 pero dice que no existe ese comando
-
cual es la clave de los rar
-
alguien me puede ayudar a implementarlo ya puse todo me sale el sistema bien pero no me da las habilidades y en el syserr del cliente no me sale ningun error
-
-
que traen estos files no hay mas fotos
-
me puedes hacer el pot-bomber para un game 1765
ayuda con un codigo de la item-shop
en Ayudas y preguntas
Publicado
asi me da otro error en otra pagina
no se supone que asi SELECT * FROM player.item WHERE pos=:po AND owner_id=:ow selecciona todas las tablas
pero si hagarro y comento la linea 8 el codigo me funciona perfecto.
esta es la linea 8: $canta ->execute(array("ow"=>$_SESSION['id'], "po"=>40));