RE: [PHP] odbc fetch array issues
| From: | Jay Blanchard | Date: | Tue, 16 Nov 2004 22:30:34 +0000 |
| Subject: | RE: [PHP] odbc fetch array issues | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202233@lists.php.net to get a copy of this message | ||
[snip]
$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
$result = odbc_exec($dbConnection, $sql);
while ($rows = odbc_fetch_array($result)) { //This doesn't work with
odbc_fetch_object either
print $rows->COLUMNNAME;
}
[/snip]
For odbc_fetch_array you would have to use
print $rows['COLUMNNAME'];