close
Skip to content

selecting() not get correct columns in results #153

Description

@t-walker-wei

Describe the bug
selecting() not get correct columns in results.I query multiple columns,but alway only get the last one in the result.

Environment (please complete the following information):

  • EZSQL Version : 4.0.0
  • PHP Version: 7.1.2
  • SQL Driver:mysql

PHP code snippet used

require 'vendor/autoload.php';

use ezsql\Config;
use ezsql\Database\ez_mysqli;
$settings = new Config('mysqli',['root','root','monitor','localhost']);
$db = new ez_mysqli($settings);
$db->prepareOn();
$result = $db -> selecting( 'users', 'tel_num, email', $db -> where(eq( 'user_name', 'walker' )) );
$db->debug();
print_r( $result );

This is what I got.

ezSQL (v4.0.0) Debug..
Query [1] -- [SELECT tel_num, email FROM users WHERE user_name = ?]

Query Result..

(row)

1 walker@mail.com
Array ( [0] => stdClass Object ( [email] => walker@mail.com ) )

Metadata

Metadata

Assignees

No one assigned

    Labels

    error-bugIssues causing application termination.warning-bugIssues not causing scripts/routines to die/fail.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions