Jump to content

Why is this loop infinite? MS Access trouble.


benphp

Recommended Posts

I have a table called states with 51 states in it. When I run this query, I get an infinite loop.

 

<?php
$dbConn = fnOpenDbConn();

$sql = "SELECT sName, ID FROM states WHERE sName = 'California' ";
$rS = $dbConn->execute($sql);
$c0 = $rS->Fields(0);

while (!$rS->EOF) {
$sName = $c0->value;
print "$sName<br />";
}
?>

 

There is only one record that matches this query.

 

I use the EXACT syntax for other pages with no problem. Anyone see something I can't? I'm blind.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.