[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16688111#comment-16688111
 ] 

ASF GitHub Bot commented on IGNITE-9897:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/5248


> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-11 Thread Vladimir Ozerov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16683332#comment-16683332
 ] 

Vladimir Ozerov commented on IGNITE-9897:
-

[~isapego], looks good to me.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-03 Thread Roman Shtykh (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16674271#comment-16674271
 ] 

Roman Shtykh commented on IGNITE-9897:
--

[~isapego] Great! Thanks for the fix!

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16673165#comment-16673165
 ] 

ASF GitHub Bot commented on IGNITE-9897:


GitHub user isapego opened a pull request:

https://github.com/apache/ignite/pull/5248

IGNITE-9897: ODBC fix for PDO when used with unixODBC



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gridgain/apache-ignite ignite-9897

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/5248.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #5248


commit 28f4a3a866f0d090baf4b20fa2085e9e58c68cee
Author: Igor Sapego 
Date:   2018-11-02T14:16:37Z

IGNITE-9897: ODBC fix for PDO when used with unixODBC




> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-02 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16673120#comment-16673120
 ] 

Igor Sapego commented on IGNITE-9897:
-

Ok, it seems that root cause is the same as in IGNITE-7362 - PDO sets 
{{SQL_ATTR_ODBC_CURSORS}} connection attribute to {{SQL_CUR_USE_IF_NEEDED}}, 
except that unixODBC decides to use cursor library if the {{SQL_CA1_ABSOLUTE}} 
flag of {{SQL_STATIC_CURSOR_ATTRIBUTES1}} attribute is not set.

So, the current fix is to add {{SQL_CA1_ABSOLUTE}} flag for 
{{SQL_STATIC_CURSOR_ATTRIBUTES1}} driver info.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-11-01 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671856#comment-16671856
 ] 

Igor Sapego commented on IGNITE-9897:
-

Attached a unixOdbc.log, and odbc.log showing that unixOdbc Driver Manager 
passes {{SQLFetchScroll}} calls as {{SQLFetch}} and rejecting {{SQLGetData}} 
calls without any notifications to a driver. I'm going to investigate unixOdbc 
sources to find out the reason of this behaviour.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: odbc.log, phpPDO2.out, phpPdo.out, unixOdbc.log
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-31 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16669928#comment-16669928
 ] 

Igor Sapego commented on IGNITE-9897:
-

Reproduced with unixODBC. I'll let you know once I'll find out the root cause.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: phpPDO2.out, phpPdo.out
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-31 Thread Roman Shtykh (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16669831#comment-16669831
 ] 

Roman Shtykh commented on IGNITE-9897:
--

[~isapego], I added the output from my colleague with PHP 7.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: phpPDO2.out, phpPdo.out
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-30 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16668891#comment-16668891
 ] 

Igor Sapego commented on IGNITE-9897:
-

Tested with PHP 5, it works too. Going to test with UnixODBC now.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: phpPdo.out
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-30 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16668848#comment-16668848
 ] 

Igor Sapego commented on IGNITE-9897:
-

I tried to reproduce it on PHP 7 and everything seems to be OK. Now, let me 
check on PHP 5.0

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
> Attachments: phpPdo.out
>
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {code:php}
>  try {
> echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;
> $dbh = new PDO('odbc:ApacheIgnite');
> $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
> $sql = 'SELECT * FROM "Person".Person';
> $data = $dbh->query($sql);
> foreach($data as $row) {
> var_export($row);
>   }
> echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;
>   
> $conn = odbc_connect('ApacheIgnite','','');
> $rs = odbc_exec($conn, $sql);
>   
> while($row = odbc_fetch_array($rs)) {
> var_export($row);
>   }
> 
> } catch (PDOException $e) {
> print "Error!: " . $e->getMessage() . "\n";
> die();
> }
> ?>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-30 Thread Roman Shtykh (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16668818#comment-16668818
 ] 

Roman Shtykh commented on IGNITE-9897:
--

[~isapego] 

{{Array}}
{{(}}
{{    [ORGID] => 2}}
{{    [0] => 2}}
{{    [FIRSTNAME] => }}
{{    [1] => }}{{}}

...

All the rest are empty columns.

I am using unixODBC

{{$ odbcinst -j}}
{{unixODBC 2.3.1}}
{{DRIVERS: /etc/odbcinst.ini}}
{{SYSTEM DATA SOURCES: /etc/odbc.ini}}
{{FILE DATA SOURCES..: /etc/ODBCDataSources}}
{{USER DATA SOURCES..: /home/xxx/.odbc.ini}}
{{SQLULEN Size...: 8}}
{{SQLLEN Size: 8}}
{{SQLSETPOSIROW Size.: 8}}

 

{{$ php --version}}
{{PHP 5.4.16 (cli)}}

 

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {{  {{try {}}
>  {{    echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;}}
>  {{    $dbh = new PDO('odbc:ApacheIgnite');}}
>  {{    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);}}
> {{    $sql = 'SELECT * FROM "Person".Person';}}
>  {{    $data = $dbh->query($sql);}}
> {{    foreach($data as $row) {}}
>  {{    var_export($row);}}
> {{    echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;}}
>  {{    $conn = odbc_connect('ApacheIgnite','','');}}
>  {{    $rs = odbc_exec($conn, $sql);}}
>  {{  while($row = odbc_fetch_array($rs)){}}
>  {{  var_export($row);}}
>   }
>  {{} catch (PDOException $e) {}}
>  {{    print "Error!: " . $e->getMessage() . "\n";}}
>  {{    die();}}
>  {{}}}
>  {{?>}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9897) Quering with PDO returns null for all column values except the 1st one

2018-10-30 Thread Igor Sapego (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16668763#comment-16668763
 ] 

Igor Sapego commented on IGNITE-9897:
-

[~roman_s], can you please provide your output? I can't reproduce the issue.

> Quering with PDO returns null for all column values except the 1st one
> --
>
> Key: IGNITE-9897
> URL: https://issues.apache.org/jira/browse/IGNITE-9897
> Project: Ignite
>  Issue Type: Bug
>  Components: odbc
>Affects Versions: 2.6
> Environment: CentOS
>Reporter: Roman Shtykh
>Assignee: Igor Sapego
>Priority: Major
>
> Using _odbc_connect_ returns all column values, but with _PDO_ only the 1st 
> one – all the rest are null.
>  Reproduced on CentOS.
>  # Start a server node with Ignite CPP
>  # Run odbc-example (which will create two tables)
>  # Run a simple PHP script
> {{  {{try {}}
>  {{    echo PHP_EOL,PHP_EOL,"# Using PDO",PHP_EOL;}}
>  {{    $dbh = new PDO('odbc:ApacheIgnite');}}
>  {{    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);}}
> {{    $sql = 'SELECT * FROM "Person".Person';}}
>  {{    $data = $dbh->query($sql);}}
> {{    foreach($data as $row) {}}
>  {{    var_export($row);}}
> {{    echo PHP_EOL,PHP_EOL,"# Using odbc_*( ) Functions",PHP_EOL;}}
>  {{    $conn = odbc_connect('ApacheIgnite','','');}}
>  {{    $rs = odbc_exec($conn, $sql);}}
>  {{  while($row = odbc_fetch_array($rs)){}}
>  {{  var_export($row);}}
>   }
>  {{} catch (PDOException $e) {}}
>  {{    print "Error!: " . $e->getMessage() . "\n";}}
>  {{    die();}}
>  {{}}}
>  {{?>}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)