Hello,
Wasn't sure if I should post here or in the database section but could some one tell me why this error is happening.
Warning: odbc_fetch_row(): 2 is not a valid ODBC result resource in blah blah blah.
This is my script:
<?PHP
//Connect to database
$cnx = odbc_connect( 'Test', '', '');
if (!$cnx){
Error_handler( "Error in odbc_connect" , $cnx);
}
$cur= odbc_exec( $cnx, "select * from Test");
$nbrow=0;
while( odbc_fetch_row( $cur)) {
$one= odbc_result( $cur, 1); //Get the field
$two= odbc_result( $cur,2 ); //Get the field
$three= odbc_result( $cur,3 ); //Get the field
echo "<table><tr><td>$one</td></tr><tr><td>$two</td></tr><tr><td>$three</td></tr></table>";
odbc_close( $cnx);
}
?>
Thanks very much to who ever helps.