خرید بک لینک

Vote count: 0

MySQLi result seems to be duplicating columns as you can see below in the screenshots. The data for each column seems to be duplicated.

enter image description here

Any thoughts one what I am doing wrong?

The DB Call

function getDBCoection() {
    // Coect to the database
    mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
    $co = new mysqli( DBHOST, DBUSER, DBPWD, DBNAME );
    if ( $co->coect_error ) {
        die( "Failed to coect with MySQL: " . $co->coect_error );
    } else {
        return $co;
    }
}

function getAllCustomers() {
    $co = getDBCoection();
    $sql = "SELECT * FROM tblCustomers" ;
    return  $co->query( $sql );
}

Outputting in PHP

$records = getAllCustomers();

if (mysqli_num_rows($records) > 0) {
    while ($row = mysqli_fetch_array($records)) {
        echo '
asked 26 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 6 ارديبهشت 1396 ساعت: 22:15

صفحه بندی