OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: possible bug in maxdb_stmt_num_rows???

From: Simenec, Thomas (thomas.simenecsap.com)
Date: Mon Jan 24 2005 - 07:17:18 CST


Hi,

You can find the actual Windows DLLs for MaxDB PHP on http://snaps.php.net. On this site, the DLLs are build from the latest CVS version several times a day.

Regards,

Thomas

-----Original Message-----
From: Gering, Sascha [mailto:sascha.geringecg-leipzig.de]
Sent: Montag, 24. Januar 2005 14:06
To: maxdblists.mysql.com
Subject: AW: possible bug in maxdb_stmt_num_rows???

Hi again,

thanks for your quick answer.
Unfortunatly I'm developing on a Windows-System.
When will the next windows-dll be released with all the changes I saw in the cvs?

Best regards,

Sascha Gering

-----Ursprüngliche Nachricht-----
Von: Simenec, Thomas [mailto:thomas.simenecsap.com]
Gesendet: Montag, 24. Januar 2005 13:25
An: Gering, Sascha
Cc: maxdblists.mysql.com
Betreff: RE: possible bug in maxdb_stmt_num_rows???

Hi,

See http://cvs.php.net/pecl/maxdb for a corrected version that expects
one parameter for maxdb_stmt_num_rows as described in the documentation.

The current MaxDB PHP API does not have the possibility of getting a
result object out of an executed prepared query.

You need not to use maxdb_stmt_store_result in your MaxDB PHP scripts,
for this function was only introduced for compatibility reasons to
MySQL's mysqli extension; it has no functional effect.

Regards,

Thomas Simenec
SAP Labs Berlin

-----Original Message-----
From: Gering, Sascha [mailto:sascha.geringecg-leipzig.de]
Sent: Mittwoch, 19. Januar 2005 16:51
To: maxdblists.mysql.com
Subject: possible bug in maxdb_stmt_num_rows???

Hi,

when I test the example shown in the php-maxdb-documentation (see below)
I get the
following warning:

Warning: maxdb_stmt_num_rows() expects exactly 2 parameters, 1 given in
C:\... on line 20
Number of rows: 0.

In the documentation this function has only one parameter. Where is the
mistake?

And by the way is it possible to retrieve a result object out of a
executed prepared query???

thanks a lot

Sascha

<?php
/* Open a connection */
$link = maxdb_connect("localhost", "my_user", "my_password", "world");

/* check connection */
if (maxdb_connect_errno()) {
    printf("Connect failed: %s\n", maxdb_connect_error());
    exit();
}

$query = "SELECT Name, CountryCode FROM City ORDER BY Name";
if ($stmt = maxdb_prepare($link, $query)) {

    /* execute query */
    maxdb_stmt_execute($stmt);

    /* store result */
    maxdb_stmt_store_result($stmt);

    printf("Number of rows: %d.\n", maxdb_stmt_num_rows($stmt));

    /* close statement */
    maxdb_stmt_close($stmt);
}

/* close connection */
maxdb_close($link);
?>

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/maxdb?unsub=thomas.simenecsap.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=thomas.simenecsap.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb