错误报告未显示任何内容 [英] Error reporting not displaying anything
问题描述
我已经检查了这一点,但我看不到它的问题,尽管IVE尝试了错误报告并且IVE只是一个空白页,我没有看到我的代码有问题,但是我需要它来输出内容?有人有想法吗?
在数据库中,它看起来像:USERID B1 B2 B3 B4 ....并且具有1或0(是或否),$ K1-K9定义了我在进餐表中比较的实际关键字.
有人可以帮忙吗?请参见下面的代码.
在结果表中:
USERID
B1
B2
B3
B4
B5
B6 ...全部为1或0(对或错)
K定义B的所有值Bnumbers
$ K1 =("cheese");
$ K2 =(酸奶");
$ K3 =(培根");
$ K4 =(水果");
$ K5 =(谷物");等....
餐台
列:
MealID | NAME-餐名|说明|类别|关键字|
1 |粥如何制作|早餐谷物|
我尝试过的事情:
i have checked this and I cant see the problem with it, although ive tried error reporting and ive just got a blank page, i dont see a problem with my code, but i need it to to output things?? Anyone any ideas?
In the DB it looks like: USERID B1 B2 B3 B4.... and has either 1 or 0 (TRUE OR FALSE) the $K1-K9 define the actual keyword which i compare in the meals table.
Can someone please help? See code below.
In Results table:
USERID
B1
B2
B3
B4
B5
B6... all with 1 or 0 (TRUE OR FALSE)
K Defines all the values for B Bnumbers
$K1 = ("cheese");
$K2 = ("yoghurt");
$K3 = ("bacon");
$K4 = ("fruit");
$K5 = ("cereal"); etc....
MEALS TABLE
Columns:
MealID | NAME - Meal Name | Instructions | CATEGORY| Keyword |
1 | Porridge | how to make it | Breakfast | cereal|
What I have tried:
$K1 = ("cheese"); (K1-9 of these are define with different values)
$dbQuery = $conn->prepare("SELECT * FROM Results where UserID=:UserID");
$dbParams = array(':UserID'=>$UserID);
$dbQuery->execute($dbParams);
while ($dbRow = $dbQuery->fetch(PDO::FETCH_ASSOC))
{
for ($number = 1; $number <= 9; ++$number) { //9 words
$breakfast = "B$number";
$Meal = $dbRow[$breakfast];
}
}
for ($number = 1; $number <= 9; ++$number) {
$Keyword = "K$number";
$breakfast = "B$number";
if ($Meal == '1')
{
$dbQuery = $conn->prepare("SELECT * FROM Meals where Category='Breakfast' AND Keyword=:Keyword");
$dbParams = array(':Keyword'=> $Keyword);
$dbQuery->execute($dbParams);
//output to display
推荐答案
K1-K9定义我在进餐表中比较的实际关键字.
有人可以帮忙吗?请参见下面的代码.
在结果表中:
USERID
B1
B2
B3
B4
B5
B6 ...全部为1或0(对或错)
K定义B的所有值Bnumbers
K1-K9 define the actual keyword which i compare in the meals table.
Can someone please help? See code below.
In Results table:
USERID
B1
B2
B3
B4
B5
B6... all with 1 or 0 (TRUE OR FALSE)
K Defines all the values for B Bnumbers
K1 =(奶酪");
K1 = ("cheese");
K2 =(酸奶");
K2 = ("yoghurt");
这篇关于错误报告未显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!