PHP 프로그래밍 오류 (while 루프를 실행할 수 없음)

얀 슈앙 로우
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />

<?php
    session_start();

    $conn = mysqli_connect("localhost", "root", "","test");

    $product_code = $_GET['product_code'];
    $sql = "SELECT * FROM test_config WHERE product_code = '$product_code'";
    $product_list = mysqli_query ( $conn, $sql);

    if($product_list = 1)
    echo"good";
    else
    echo"bad"; 
?>
</head>

<body>

<span id="tttt"></span>
<form id="msform" method="post">
<!-- progressbar -->
<ul id="progressbar">
<li class="active">

<?php While ($one_product = mysqli_fetch_assoc($product_list)) {?>


<li><?php echo $one_product['test_name']; ?></li>

<?php } ?>

<!-- <a href="index.html" >Start-Over</a>  -->
<span onclick="window.close()" style="float:right">Start-Over</span>
</ul>

<?php While ( $one_product = mysqli_fetch_assoc($product_list)  ) { 

        $num_test = $one_product['num_test'];
        $test_name = $one_product['test_name'];
        $images_pos = $one_product['images_pos'];
        $images_neg = $one_product['images_neg'];
        $images_inv = $one_product['images_inv'];
?>
<!-- fieldsets -->
<fieldset id="<?php $test_name; ?>" data-set="0">
<h2 class="fs-title"><?php echo "$test_name"; ?></h2>
<img src="images/<?php $images_pos; ?>"  class="case" data-case="1"/><br/>
<input name="<?php $test_name; ?>" type="radio" value="N" class="hide">
<img src="images/<?php $images_neg; ?>"  class="case" data-case="2"/><br/>
<input name="<?php $test_name; ?>" type="radio" value="P" class="hide">
<img src="images/<?php $images_inv; ?>"  class="case" data-case="3"/><br/>
<input name="<?php $test_name; ?>" type="radio" value="I" class="hide">
<img src="images/skip_button.fw.png"  class="case" data-case="4"/><br/>
<input name="<?php $test_name; ?>" type="radio" value="S" class="hide">
<br/>

<?php if ($num_test > 1) { ?>
<input type="button" name="next" class="next action-button" value="Next" />

<br/>
<?php if($num_test == 1) { ?>

<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="submit" id="submit" class="action-button" value="SAVE" />

</fieldset>
<?php }
$num_test --; ?>
<?php } }?>

</form>

</body>
</html>

오류 : 경고 : mysqli_fetch_assoc ()는 매개 변수 1이 mysqli_result, 41 행과 52 행에 주어진 정수 (를 포함하는 행)를 예상합니다.

감사합니다 !!!!! SQL은 데이터베이스에서 데이터를 가져옵니다. 그러나 while 루프에는 여전히 약간의 오류가 있습니다.

얀 슈앙 로우

if ($ product_list = 1) echo "좋음"; 그렇지 않으면 "나쁜"에코;

거기 있으면 안됩니다. $ product_list를 부울로 만들므로 루프를 실행할 수 없습니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

R 병렬 프로그래밍 : {오류 : 작업 1 실패- ""%> % "함수를 찾을 수 없음"

분류에서Dev

응용 프로그램을 실행할 때 클래스를 찾을 수 없음 오류

분류에서Dev

.jar 종속성으로 Java 응용 프로그램을 실행할 수 없음- '오류 : 주 클래스를 찾거나로드 할 수 없음'

분류에서Dev

반복 루프를 완전히 실행할 수 없음 : D [, 1] 오류 : 잘못된 차원 수

분류에서Dev

Grails를 실행할 수 없음, 클래스 확인 오류

분류에서Dev

virtualenv에서 pip를 실행할 수 없음-분할 오류 (코어 덤프 됨)

분류에서Dev

컴파일 된 프로그램을 실행할 수 없음 : 실행 형식 오류

분류에서Dev

내 프로그램이 "명령을 찾을 수 없음"오류와 함께 실행할 수 없습니다.

분류에서Dev

내 프로그램이 "명령을 찾을 수 없음"오류와 함께 실행할 수 없습니다.

분류에서Dev

do-while 루프를 완전히 실행할 수 없습니다.

분류에서Dev

while을 사용하여 루프를 실행할 수 없습니다.

분류에서Dev

동적 프로그래밍을 이해할 수 없음

분류에서Dev

프로그래밍 방식으로 Eclipse 빠른 수정을 호출 할 때 실행 시간 오류

분류에서Dev

C 프로그래밍의 BMI 계산기 ... 실행할 수 없습니까?

분류에서Dev

PHP 프로그래밍 구문 오류

분류에서Dev

Blackberry 오류 : "jar"프로그램을 실행할 수 없음 : CreateProcess 오류 = 2, 시스템이 지정된 파일을 찾을 수 없음

분류에서Dev

Eclipse에서 간단한 프로그램 Opencv 3.1을 실행할 수 없음 (연결 오류)

분류에서Dev

전구를 사용하여 Titan GraphDB / Rexster를 프로그래밍 할 수 없음

분류에서Dev

Air-Adb : 오류 "프로그램"bash.exe "를 실행할 수 없음 : CreateProcess error = 2, 시스템이 지정된 파일을 찾을 수 없음)

분류에서Dev

`sh`로 스크립트를 실행할 때 찾을 수 없음 오류

분류에서Dev

`sh`로 스크립트를 실행할 때 찾을 수 없음 오류

분류에서Dev

while 루프에서 업데이트 문을 실행할 수 없습니다 .php mysqli

분류에서Dev

동기화되지 않은 명령 지금은이 명령을 실행할 수 없습니다. PHP While 루프

분류에서Dev

PyCharm 오류 : 프로그램을 실행할 수 없음, 오류 = 2, 해당 파일 또는 디렉터리 없음

분류에서Dev

Visual Studio 2012-32 비트에서 프로젝트를 실행할 수 없음 (0xc000007b 오류)

분류에서Dev

ASM : 루프의 세그 오류, 이유를 알 수 없음

분류에서Dev

실행 오류 : 프로그램을 시작할 수 없습니다.

분류에서Dev

PHP : 각 루프를 반복 할 수 없음

분류에서Dev

Github에서 프로젝트 가져 오기를 실행할 수 없음

Related 관련 기사

  1. 1

    R 병렬 프로그래밍 : {오류 : 작업 1 실패- ""%> % "함수를 찾을 수 없음"

  2. 2

    응용 프로그램을 실행할 때 클래스를 찾을 수 없음 오류

  3. 3

    .jar 종속성으로 Java 응용 프로그램을 실행할 수 없음- '오류 : 주 클래스를 찾거나로드 할 수 없음'

  4. 4

    반복 루프를 완전히 실행할 수 없음 : D [, 1] 오류 : 잘못된 차원 수

  5. 5

    Grails를 실행할 수 없음, 클래스 확인 오류

  6. 6

    virtualenv에서 pip를 실행할 수 없음-분할 오류 (코어 덤프 됨)

  7. 7

    컴파일 된 프로그램을 실행할 수 없음 : 실행 형식 오류

  8. 8

    내 프로그램이 "명령을 찾을 수 없음"오류와 함께 실행할 수 없습니다.

  9. 9

    내 프로그램이 "명령을 찾을 수 없음"오류와 함께 실행할 수 없습니다.

  10. 10

    do-while 루프를 완전히 실행할 수 없습니다.

  11. 11

    while을 사용하여 루프를 실행할 수 없습니다.

  12. 12

    동적 프로그래밍을 이해할 수 없음

  13. 13

    프로그래밍 방식으로 Eclipse 빠른 수정을 호출 할 때 실행 시간 오류

  14. 14

    C 프로그래밍의 BMI 계산기 ... 실행할 수 없습니까?

  15. 15

    PHP 프로그래밍 구문 오류

  16. 16

    Blackberry 오류 : "jar"프로그램을 실행할 수 없음 : CreateProcess 오류 = 2, 시스템이 지정된 파일을 찾을 수 없음

  17. 17

    Eclipse에서 간단한 프로그램 Opencv 3.1을 실행할 수 없음 (연결 오류)

  18. 18

    전구를 사용하여 Titan GraphDB / Rexster를 프로그래밍 할 수 없음

  19. 19

    Air-Adb : 오류 "프로그램"bash.exe "를 실행할 수 없음 : CreateProcess error = 2, 시스템이 지정된 파일을 찾을 수 없음)

  20. 20

    `sh`로 스크립트를 실행할 때 찾을 수 없음 오류

  21. 21

    `sh`로 스크립트를 실행할 때 찾을 수 없음 오류

  22. 22

    while 루프에서 업데이트 문을 실행할 수 없습니다 .php mysqli

  23. 23

    동기화되지 않은 명령 지금은이 명령을 실행할 수 없습니다. PHP While 루프

  24. 24

    PyCharm 오류 : 프로그램을 실행할 수 없음, 오류 = 2, 해당 파일 또는 디렉터리 없음

  25. 25

    Visual Studio 2012-32 비트에서 프로젝트를 실행할 수 없음 (0xc000007b 오류)

  26. 26

    ASM : 루프의 세그 오류, 이유를 알 수 없음

  27. 27

    실행 오류 : 프로그램을 시작할 수 없습니다.

  28. 28

    PHP : 각 루프를 반복 할 수 없음

  29. 29

    Github에서 프로젝트 가져 오기를 실행할 수 없음

뜨겁다태그

보관