Wie kann ich mit MySQL mehr als 50 Ergebnisse in Excel anzeigen lassen?

Ich habe gesucht und gesucht und ich kann meine Antwort nicht finden. Ich hoffe, jemand kann helfen. Ich habe einen Code, der eine MySQL-Datenbank durchsucht und X Anzahl von Ergebnissen auf einer Website anzeigt. Ich Sucher kann dann die Ergebnisse in eine Excel-Tabelle exportieren. Mein Problem ist, dass die Ergebnisse in Hunderten zurückkommen und die Tabelle nur 50 anzeigt. Es gibt viel mehr zu diesem Code, aber etwas sagt mir vielleicht, dass es hier drin ist, und um zu sparen, mehr als 400 Codezeilen in die von mir angezeigte Liste aufzunehmen diese.

$sql .= ",
                        IF (cycle_id = 4,
                            " . ((4 == $next_available_quarter) ?
                                "'" . $next_available_quarter_month[4] . "-{$next_available_quarter_year}'" :
                                "'" . $next_available_quarter_month[4] . "-" . ($next_available_quarter_year+1) . "'") . "
                            ,
                            IF (cycle_id = 3,
                                " . ((3 == $next_available_quarter) ?
                                    "'" . $next_available_quarter_month[3] . "-{$next_available_quarter_year}'" :
                                    "'" . $next_available_quarter_month[3] . "-" . ($next_available_quarter_year+1) . "'") . "
                                ,
                                IF (cycle_id = 2,
                                    " . ((2 == $next_available_quarter) ?
                                        "'" . $next_available_quarter_month[2] . "-{$next_available_quarter_year}'" :
                                        "'" . $next_available_quarter_month[2] . "-" . ($next_available_quarter_year+1) . "'") . "
                                    ,
                                    " . ((1 == $next_available_quarter) ?
                                        "'" . $next_available_quarter_month[1] . "-{$next_available_quarter_year}'" :
                                        "'" . $next_available_quarter_month[1] . "-" . ($next_available_quarter_year+1) . "'") . "
                                    )
                                )
                            )
                        )
                    )
                )
            ) as next_run
    FROM
        tax_search_loans tsl
    LEFT JOIN
        tax_searches ts
    ON
        (tsl.tax_search_loan_id = ts.tax_search_loan_id)
    LEFT JOIN
        tax_search_results tsr
    ON
        (tsr.tax_search_id = ts.tax_search_id)
    LEFT JOIN
        states
    ON
        (tsl.state_id = states.state_id)
    LEFT JOIN
        tax_search_loan_officers tslo
    ON
        (tslo.tax_search_loan_officer_id = tsl.tax_search_loan_officer_id)
    WHERE
        tsl.active = 'Y' AND
        tslo.active = 'Y' AND
        tslo.customer_code IN ('" . implode("','", explode(',', $DB->cleanString($_GET['custcodes']))) . "') AND
        (ts.active IS NULL OR ts.active = 'Y') AND
        (tsr.active IS NULL OR tsr.active = 'Y')
        LIMIT 0, 50
    ";

Antworten auf die Frage(1)

Ihre Antwort auf die Frage