MySQL 2 tablodan "ID" sayılarından eşleştirip veri çekmek istiyorum.
Örnek olarak bir kategorideki birden çok ürünü kategori sayfasında göstermek istiyorum. Bir ürün birden çok kategoride bulunabiliyor.
Bunun için hangi komutu kullanmam gerekiyor? Şimdiden teşekkürler.
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
$sorgu = "SELECT categorizations.title, triz_principles.principles FROM categorizations INNER JOIN triz_principles ON triz_principles.triz_principles_id = categorizations.id";
Komutu kullanıyorum "id" değeri önceki sayfadan geliyor fakat komut "Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in" hatası veriyor.
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
"$sorgu= "SELECT * FROM categorizations INNER JOIN triz_principles ON categorizations.triz_principles_id = triz_principles.id ";
$stmt = $con->prepare($sorgu);
$stmt->bindParam(1, $id);
$stmt->execute();"
Şeklinde düzenledim "Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in Stack trace: #0 PDOStatement->execute() #1 {main} thrown" Hatası aldım.