가능한 중복 : 난 내와 같은 주제에 조금 검색
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select오류는> 경고 : 경고 : mysql_fetch_array()은 반환 매개 변수 1에서 주어진 자원, 부울있을 것으로 기대
하지만 난 내 대답을 찾지 못해.
내가 왜 실수를하는지 알고 싶습니다. 내 변수일지도 모르지만 ... 나는 내가 아는 모든 것을 시도해 본다. 쿼리 (변수없이) phpMyAdmin을 작동하고 그것은 단지 여기 내 코드의 을 행 나에게 하나를주고 가정한다 :
<?php
session_start();
$choix = $_POST["choix"];
?>
<html>
<head>
<link rel="icon" href="images/favicon.ico" type="image/ico"/>
<style>
.corps{ width:745px; }
.image{
width: 150px;
height: 100px;
float:left;
}
.descr{
width: 560px;
height: 100px;
float:right;
margin-right: 30px;
}
.bouton{ margin-top: 15px;}
</style>
</head>
<body>
<h2>Résultat</h2>
<?php
require('manip/connexionClass.php');
$connexion = new Connexion();
$con = $connexion->open();
if($con){
mysql_select_db("test",$con);
//RECUPERATION DES INFORMATIONS DES PRODUITS
$query = "
SELECT *
FROM `materiel` , `produit`
WHERE `produit`.`idProduit` = (
SELECT `idProduit`
FROM `materiel`
WHERE `materiel`.`type` LIKE '%$choix%'
)
AND `materiel`.`idProduit` = `produit`.`idProduit`
UNION
SELECT *
FROM `medicament` , `produit`
WHERE `produit`.`idProduit` = (
SELECT `idProduit`
FROM `medicament`
WHERE `medicament`.`typeMed` LIKE '%$choix%'
)
AND `medicament`.`idProduit` = `produit`.`idProduit`
";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>
<div class = "corps">
<div class = 'image'>
<img src = 'images/imgMedic/tylenol.png' />
</div>
<div class = 'descr'>
<div class = "title"> <?php echo $row["nom"]; ?></div>
<div class = "plus"> <?php echo $row["descr"]; ?></div>
<div class = 'bouton'>
<img src = 'images/icones Web/basket_add.png' />  Ajouter au panier
<img style = 'margin-left: 15px;' src = 'images/icones Web/pill_go.png' />  Détails
</div>
</div>
</div>
<?php
}
}//$con
?>
</body>
</html>
당신은 바비 테이블을 아십니까 문제 해결에 필요한 당신이 대답 (오류)를 줄 것이다? – Drewdin
nop 미안 해요 모르겠다 – Hulk
여기 작은 바비 테이블에 대한 소개입니다. http://xkcd.com/327/ – vascowhite