有一點問題與我的PHP代碼數據..PHP的MySQL提取毛坯
$stmt = $db->prepare("SELECT * FROM mytable WHERE TheGroup = :SearchName ORDER BY TheTime DESC");
$stmt->bindParam(':SearchName', $request, PDO::PARAM_STR);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
$count = count($result);
for ($i = 0; $i < $count; $i++) {
$mTheAvatar = $result[$i]->TheAvatar;
$mTheDirection= $result[$i]->TheDirection;
$mTheGroup = $result[$i]->TheGroup;
$mTheMedia = $result[$i]->TheMedia;
$mTheMessage = $result[$i]->TheMessage;
$mTheSenderName= $result[$i]->TheSenderName;
$mTheThumbImage = $result[$i]->TheThumbImage;
$mTheTime = $result[$i]->TheTime;
$mTheMediaExtension = $result[$i]->TheMediaExtension;
echo "hello";
echo $mTheAvatar;
echo " <- this is avatar";
}
如果我做的var_dump()我看到被請求的數據沒有問題。 如果我附和變量,它們是空白.. 我有三重檢查,該表的列名是否正確..
的$ mTheAvater是在表中的PIC,如果給出了一個可能的線索,但其餘的都是空白以及不知道什麼是???
你可以在這裏包含'var_dump()'的輸出嗎? – Epodax