Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum


Go Back   Ingres Community Forums > Ingres Forums > Database Drivers and APIs > PHP
 

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-12-20   #1 (permalink)
Ingres Staff
 
grant's Avatar
 
Join Date: Mar 2007
Location: Valladolid, España
Posts: 288
Send a message via MSN to grant
Smile [ANNOUNCEMENT] ingres-2.0.1 (stable) Released.

The new PECL package ingres-2.0.1 (stable) has been released at PECL :: The PHP Extension Community Library.

Release notes
-------------
This release fixes a number problems discovered since 2.0.0 was released. See below for the list of changes made:
- Improved performance by batch fetching rows
- Improved interoperability when working with older Ingres releases
- Improved cleanup when a transaction/session is prematurely aborted
- Replaced "long long int" with "__int64" to allow the extension to build with VC6
- Use PZVAL_ISREF instead of pointing at (*val)->is_ref
- Added --enable-ingres2 to generate php_ingres2.dll for Windows
- Fixed regression with IIAPI_CP_LOGIN_LOCAL being used at the wrong API level
- Revised PECL_INGRES_VERSION to take in to consideration --enable-ingres2
- Fixed LOB retrieval when used with scollable cursors with Ingres 9.2.0

Package Info
-------------
This extension supports the Ingres Relational Database System.

Related Links
-------------
Package home: PECL :: Package :: ingres
Changelog: PECL :: ingres Changelog
Download: http://pecl.php.net/get/ingres-2.0.1.tgz
Readme: Ingres extension for PHP

Binaries for Windows will be released to http://esd.ingres.com/product/drivers/PHP in due course.

See the README for information about obtaining support for this release.
__________________
Ingres PHP and Ruby Maintainer
http://blogs.planetingres.org/grant

Last edited by grant; 2009-01-23 at 08:58 AM.
grant is offline   Reply With Quote
Old 2009-01-04   #2 (permalink)
Junior Member
 
Join Date: Sep 2007
Location: Auckland , New Zealand
Posts: 8
Default

Can you please refer me to the documentation that goes with the latest release. The PHP site documentation still refers to the old version...
edwardg is offline   Reply With Quote
Old 2009-01-06   #3 (permalink)
Junior Member
 
Join Date: Mar 2007
Posts: 6
Default

Where can i find example for usage ingres_prepare() and ingres_execute()
functions?
VBulov is offline   Reply With Quote
Old 2009-01-06   #4 (permalink)
Junior Member
 
Join Date: Mar 2007
Posts: 6
Default

try ingres_prepare() ingres_execute() usage

I try modify example

PHP - Nested (Master Detail) query

http://community.ingres.com/wiki/PHP...etail%29_query.


I change

$sql = "select * from iirelation where relid = '".trim($iirelation->relid)."'";
$detail = ingres_query($link,$sql);

on

$pre = ingres_prepare($link,"select * from iirelation where relid = '?' ");
$detail = ingres_execute($pre,array(trim($iirelation->relid)),"c");

after that I have in function ingres_execute()

API function cannot be called in the current state

Syntax error on line 1. Last symbol read was: 'EOF'

...
Number of open cursors exceeds the local limit.
and
segmentation violation


Who can explain my mistake?
VBulov is offline   Reply With Quote
Old 2009-01-07   #5 (permalink)
Ingres Staff
 
grant's Avatar
 
Join Date: Mar 2007
Location: Valladolid, España
Posts: 288
Send a message via MSN to grant
Default

Quote:
Originally Posted by edwardg View Post
Can you please refer me to the documentation that goes with the latest release. The PHP site documentation still refers to the old version...
Unfortunately I am still in the process of updating it. See http://community.ingres.com/wiki/Ingres_Examples#PHP for example code. If you have any questions feel free to post here or mail me via grantc (at) php (dot) net.

regards

grant
__________________
Ingres PHP and Ruby Maintainer
http://blogs.planetingres.org/grant
grant is offline   Reply With Quote
Old 2009-01-07   #6 (permalink)
Ingres Staff
 
grant's Avatar
 
Join Date: Mar 2007
Location: Valladolid, España
Posts: 288
Send a message via MSN to grant
Default

Quote:
Originally Posted by VBulov View Post
try ingres_prepare() ingres_execute() usage

I try modify example

PHP - Nested (Master Detail) query

http://community.ingres.com/wiki/PHP...etail%29_query.


I change

$sql = "select * from iirelation where relid = '".trim($iirelation->relid)."'";
$detail = ingres_query($link,$sql);

on

$pre = ingres_prepare($link,"select * from iirelation where relid = '?' ");
$detail = ingres_execute($pre,array(trim($iirelation->relid)),"c");

after that I have in function ingres_execute()

API function cannot be called in the current state

Syntax error on line 1. Last symbol read was: 'EOF'

...
Number of open cursors exceeds the local limit.
and
segmentation violation


Who can explain my mistake?
VBulov - Can you provide the version of the php driver, php and Ingres you are using?

thanks

grant
__________________
Ingres PHP and Ruby Maintainer
http://blogs.planetingres.org/grant
grant is offline   Reply With Quote
Old 2009-01-08   #7 (permalink)
Junior Member
 
Join Date: Mar 2007
Posts: 6
Default

in php script

echo 'INGRES_EXT_VERSION=';
echo INGRES_EXT_VERSION;
echo "</br>";
echo 'INGRES_API_VERSION=';
echo INGRES_API_VERSION;


Ingres_ext_version=2.0.1
Ingres_api_version=6

phpinfo -> PHP Version 5.2.6

version.rel->II 9.3.0 (int.lnx/138)NPTL

Last edited by VBulov; 2009-01-08 at 11:24 AM.
VBulov is offline   Reply With Quote
Old 2009-01-12   #8 (permalink)
Ingres Corp
 
matt's Avatar
 
Join Date: Jun 2008
Location: California
Posts: 6
Talking

sweet Grant!
I'll give this a run soon, glad to see a new update for the PHP driver, hope you are doing well
__________________
m@

Linux Ingres-9.3.0-140
PHP Driver-2.0.1-dev
Join the Ingres Group at Ohloh
matt is offline   Reply With Quote
Old 2009-01-19   #9 (permalink)
Junior Member
 
Join Date: Sep 2007
Location: Auckland , New Zealand
Posts: 8
Default

Grant

The basic database manipulation is covered in the examples, but my particular issue is how to retrieve the number of rows affected on completion of a query / update.

We have this as a standard check to ensure data is processed as expected.
edwardg is offline   Reply With Quote
Old 2009-01-22   #10 (permalink)
Ingres Staff
 
grant's Avatar
 
Join Date: Mar 2007
Location: Valladolid, España
Posts: 288
Send a message via MSN to grant
Default

Quote:
Originally Posted by edwardg View Post
Grant

The basic database manipulation is covered in the examples, but my particular issue is how to retrieve the number of rows affected on completion of a query / update.

We have this as a standard check to ensure data is processed as expected.
edwardg - ingres_num_rows should do that (see PHP: ingres_num_rows - Manual).

regards

grant
__________________
Ingres PHP and Ruby Maintainer
http://blogs.planetingres.org/grant
grant is offline   Reply With Quote

Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved