Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript PHP MySQL清单数据问题_Javascript_Php_Mysql_Ajax_Database - Fatal编程技术网

Javascript PHP MySQL清单数据问题

Javascript PHP MySQL清单数据问题,javascript,php,mysql,ajax,database,Javascript,Php,Mysql,Ajax,Database,我有一些列表数据问题 数据库架构: 这是我的密码: SQL查询: SELECT tblquestions.Question, tblhints.hint, tblhints.pic, tblquestions.Id FROM tblquestions INNER JOIN tblhints ON tblquestions.GroupId = tblhints.GroupId ORDER BY RAND() LIMIT 57 它给出如下输出: 在TBL问题中,字

我有一些列表数据问题

数据库架构:

这是我的密码:

SQL查询:

SELECT tblquestions.Question, 
    tblhints.hint, 
    tblhints.pic, 
    tblquestions.Id
FROM tblquestions INNER JOIN tblhints ON tblquestions.GroupId = tblhints.GroupId ORDER BY RAND() LIMIT 57
它给出如下输出:

在TBL问题中,字段记录如下:

Php代码:

  <?php

            $i=0;
            $t=0;

            for ($i=0; $i < 57 ; $i++) { 

                while($kayitlar_rs = mysql_fetch_array($kayitlar)) {

                // $toplamkayit = mysql_num_rows($kayitlar);
                $soruGroupId = $kayitlar_rs["GroupId"];
                $hint = $kayitlar_rs["hint"];
                $sorufoto = $kayitlar_rs["pic"];

                // $sorubtntxt = array();
                $sorusql = mysql_query("select * from tblquestions where GroupId=".$soruGroupId);
                while($soruRs = mysql_fetch_array($sorusql)) {
                            $sorubtntxt[] = $kayitlar_rs["Question"];
                }

                // die();
                $i = $i+1;
                $t = $t+1;


?>

HTML/DIVs:

<div id="soru<?=$i?>">

            <span class="hint hintbg hintyazi">İPUCU: <b class="orange"><?=$hint?></b></span>
            <div class="sorufoto"><img src="../assets/ulke/<?=$sorufoto?>"></div>

            <span class="soruId"><?=$soruId?></span>
            <div id="sorubtn" class="font">
                <div id="soruBtnSol"><a class="sorubtn<?=$i?>" href="#"><span class="sorubtnTxtSol"><?=$sorubtntxt[0]?></span></a></div>
                <div id="soruBtnSag"><a class="sorubtn<?=$t?>" href="#"><span class="sorubtnTxtRight"><?=$sorubtntxt[1]?></span></a></div>
            </div>  
    </div>

有人有合作伙伴吗。代码引用了
$kayitlar\r[“GroupId”]
,但GroupId不在查询的选择列表中。2.记录被提取到
$soruRs
中,然后这个变量就永远不会被使用。3.不清楚为什么
$i
会增加两次
$t
$i/2
那么拥有两个变量有什么意义呢?