Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Error #1064
DobryCover
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 22.01.2015

Ostrzeżenie: (0%)
-----


Witam, napisałem proste 4 linie z pomocą biblioteki PDO i mam błąd. jeśli wprowadzę kod PHP do SQL:
Kod
#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 ':prid
LIMIT 0, 25' at line 1


  1. <?php
  2. require_once ('page/header.php');
  3.  
  4. $stmt = $pdo->prepare("SELECT * FROM products WHERE id = :prid");
  5. $stmt->bindValue(':prid', $prid, PDO::PARAM_INT);
  6. $stmt->execute();
  7. echo $prid;


Ten post edytował DobryCover 22.01.2015, 21:16:16
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 17:34