I've tried using the following code to access one record in my database table...

PHP Code:
  function downloadfile($fc)
    {
      print 
"hmmm<br>";
      
      
$sql " SELECT * FROM myTable ";
      
$sql .= " WHERE id=$fc ";
      
      print 
"$sql<br>";
      
      
$rs mysql_query($sql$cid);
      if (
mysql_error()) { print "Database Error: $sql " mysql_error(); }
      
      if (
mysql_num_rows() == 0)
      {
        print 
"Nothing in the recordset.<br>";
      } else {
        print 
"Something in the recordset.<br>";
      }
      
      while (
$row mysql_fetch_array($rs))
        {
          print 
"hmm";
          
//$fileloc = $row['fileloc'];
          //print "File Location: $fileloc";
          //header("Location: " . $fileloc);
        
}
      print 
"After while loop.<br>";
      exit(
0);
    } 
it returns the following...

hmmm
SELECT * FROM myTable WHERE id=59
Nothing in the recordset.
After while loop.


yet when I use this exact same query directly in MySQL it returns the appropriate record!

any ideas on why this is messing up like this?

Squirrelly1