ID:               10302
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         ODBC related
 Operating System: winnt4sp6
 PHP Version:      4.0.4pl1
 New Comment:

No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2002-01-13 07:14:45] [EMAIL PROTECTED]

Can you reproduce this error with 4.1.1?

------------------------------------------------------------------------

[2001-05-16 04:24:09] [EMAIL PROTECTED]

Update:

The same script works fine using the CGI interface.
If I select the reload page button on the browser, it works using ISAPI
about 1 in 5 times!



------------------------------------------------------------------------

[2001-05-16 02:51:32] [EMAIL PROTECTED]

I have just updated php to 4.0.5 with the same results.
I also added odbc_error() and odbc_errormsg() after the 
'SORRY . I Cant't Get The Table Details' message, and they return empty
stings.

Thanks
John

------------------------------------------------------------------------

[2001-04-23 12:27:53] [EMAIL PROTECTED]

code example:-

<?php
$dsn="php";     // System DSN
$user="GUEST";
$passwd="";
$db = odbc_connect($dsn,$user,$passwd);
if(!$db) {
        echo "SORRY: could not connect to database<br>";
        die();
}

//------------------------------------------------
// get table list
//------------------------------------------------

$table_list=array();
$result = odbc_tables($db);
if($result) {
        $count=0;

               // debug lines
        echo odbc_num_rows($result) . " Tables found <br>";
        odbc_result_all($result);
               // end debug

        while(($report = odbc_fetch_row($result))) {
                $row[$count] = odbc_result($result,3);
                $count++;
        }

        if($count > 0) {
                sort($row);
                for(reset($row);$table_list[]=current($row);next($row)) { }
        } else {
                echo "SORRY. I Can't Get The Table Details<br>";
                die();
        }
}

//-------------------------------------------------
// get field names
//-------------------------------------------------
if(!$tables)
        $tables=$table_list[0];

$result = odbc_columns($db,"","","$tables");
if($result) {
        $row=array();
        $count=0;
        while(($report = odbc_fetch_row($result))) {
                $row[$count] = odbc_result($result,4);
                $count++;
        }

        if($count > 0) {
                sort($row);
                for(reset($row);$columns[]=current($row);next($row)) {}
        } else {
                echo "SORRY. I Can't Get The Field Details<br>";
                die();
        }
}

odbc_close($db);

odbc_num_rows() returns a count of tables in the database,
odbc_results_all() returns no rows,
odbc_fetch_row() returns false.


------------------------------------------------------------------------

[2001-04-18 21:37:34] [EMAIL PROTECTED]

can you please provide a sample script on how to reproduce this?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/10302

-- 
Edit this bug report at http://bugs.php.net/?id=10302&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to