php - While loop problems -


I put the following code together, the problem is that the loop is returning only one data data every time < / P> mysql_query ("SELECT date FROM" .TBL_FIXTURES. "Where compname = '$ comp_name'" date by group); $ I = 1; Echo "and lieutenant; table cell area = \" 10 \ "style = 'border: 1px dotted' width = \" 300 \ "bgcolor = \" # eeeeee \ "& gt;"; While ($ line = mysql_fetch_assoc ($ result)) {$ date = date ("FJY", $ line ['date']); Echo $ date; Echo "& lt; tr & gt; & lt; td> Stability $ i - $ date on deadlines & lt; / td & gt; & lt; / tr & gt;"; "$ Comp =" $ comp_name '' and 'Date' as per date '=' $ line [date] '';; ($ line = mysql_fetch_assoc ($ result)); $ Result = mysql_query ("SELECT * FROM" .TBL_FIXTURES. Quotation ($ line); echo "& lt; Tr & gt; & Lt; Td> $ Home_user - $ home_team V $ away_user - $ away_team & lt; / Td> & Lt; / Tr & gt; "}} $ I ++;} resonates" & lt; / Table> ";

I should get several dates, and then below should be every group of stability, for the first time the first line of the loop is present, as well as the data of the loop

However, is not it released? Any ideas where I can improve it? Thanks

change = $ result = mysql_query ("SELECT * FROM" .TBL_FIXTURES "WHERE compname = '$ COMP_name' and date = '$ line [date]' as of 'date') ;
($ line = mysql_fetch_assoc ($ result)) with

  $ result1 = mysql_query ("SELECT * FROM" .TBL_FIXTURES. "Where compname = '$ comp_name' And date = '$ line [date]' as of the date ''); What happens to your existing code is that after the internal  executing , the next call (in the outer loop ) After  mysql_fetch_assoc ($ result)  always 
  • ($ line = mysql_fetch_assoc ($ result1))
  • (because you only turn it into internal loop You only have intestines In that loop is required to use a different variable.


    Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -