Come in and look at the wrong set of the while loop, and the entire nested loop repeats once more.

Source: Internet
Author: User
Come in and look at this while loop which set of errors, the entire nested loop repeats once ...
Repeat the effect as shown,
  -Please select- - Top-!--? php $query = "SELECT * from tbl_department where dpupid = ' 0 '"; $query _info = mysql_query ($ Query), while ($row = mysql_fetch_array ($query _info)) {?--> !--? php $query _1 = "SELECT * from tbl_department where dpupid = ' $row [dpname] '"; $query _info_1 = Mysql_que
    Ry ($query _1), while ($row _1 = mysql_fetch_array ($query _info_1)) {?-->!--? php $query _2 =" SELECT * from tbl_department where dpupid = ' $row _1[i D] ' "; $query _info_2 = mysql_query ($query _2), while ($row _2 = mysql_fetch_array ($query _info_2)) {?--> ">!--? php echo $row _2[dpname]";?--""!--? php}}}?--"  


Reply to discussion (solution)

$query = "SELECT * from tbl_department where dpupid = ' 0 '";
$query _info = mysql_query ($query);
while ($row = mysql_fetch_array ($query _info)) {
$query _1 = "SELECT * from tbl_department where dpupid = ' $row [dpname] '";
$query _info_1 = mysql_query ($query _1);
while ($row _1 = mysql_fetch_array ($query _info_1)) {
$query _2 = "SELECT * from tbl_department where dpupid = ' $row _1[id] '";
$query _info_2 = mysql_query ($query _2);
while ($row _2 = mysql_fetch_array ($query _info_2)) {
}
}
}
Is the screening range crossed?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.