#21082 [Opn->Bgs]: odbc_primarykeys Access
| From: | kalowsky@php.net | Date: | Wed, 18 Dec 2002 19:55:28 +0000 |
| Subject: | #21082 [Opn->Bgs]: odbc_primarykeys Access | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27989@lists.php.net to get a copy of this message | ||
ID: 21082
Updated by: kalowsky@php.net
Reported By: jcdavid@libertysurf.fr
-Status: Open
+Status: Bogus
Bug Type: ODBC related
Operating System: Win XP
PHP Version: 4.2.0
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
I believe this was fixed...
Previous Comments:
------------------------------------------------------------------------
[2002-12-18 13:28:40] jcdavid@libertysurf.fr
I cant get the primarykeys, php always return "Warning: SQL error: ,
SQL state 00000 in SQLPrimaryKeys"
<?php
$dsn = "gerhisto";
$usr = "";
$pwd = "";
$db = "gerhisto";
$con = odbc_connect ($dsn,$usr,$pwd) or die ("Echec de connexion sur
ODBC : $dsn");
$res = odbc_tables ($con) or die ("Pas de tables dans $db de ODBC :
$dsn");
$i=0;
while (odbc_fetch_row ($res)) {
if (odbc_result ($res, 4)=="TABLE") {
$qualifiers[$i] = odbc_result ($res, 1);
$owners[$i] = odbc_result ($res, 2);
$tables[$i] = odbc_result ($res, 3);
$types[$i] = odbc_result ($res, 4);
$remarks[$i] = odbc_result ($res, 5);
echo "$i, Table : $tables[$i], Qualifier : $qualifiers[$i], Owner :
$owners[$i], Type : $types[$i], Remarks : $remarks[$i]<br>";
$i++;
}
}
echo "<br>$i tables<br><br>";
for ($j=0;$j<$i;$j++) {
echo "Clefs Primaires de ".$tables[$j];
$res = odbc_primarykeys ($con, $qualifiers[$j], $owners[$j],
$tables[$j]);
if ($res)
odbc_result_all ($res);
else
// ==> Warning: SQL error: , SQL state 00000 in SQLPrimaryKeys
echo ("Error : ".odbc_error ($con).": ".odbc_errormsg
($con)."<BR>");
}
odbc_close ($con);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21082&edit=1