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 inC:\xampp\htdocs\item_shop\sayfalar\urun-satinal.phpon line8
no se mucho de de PDO por favor sean lo mas claro que puedan gracias........
ESTA ES LA PAGINA urun-satinal.php
Quote
ESTA 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.";
Question
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
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.