kyder -

Sorry for the long code. It was just the SQL fields and values so I didn't think it was that important.

kyder/sealeopard -

I tried what you all suggested:
Code:
$queryForCID		= "SELECT TOP 1 cid FROM computers WHERE Name='$HostName' AND MACAddress='$MAC'"



...but when I show the results (with ?), it returns "-1". When I take out the "TOP 1" portion of the SQL query, it works fine and I get 12-13 results... Do you know why that's happening? Isn't that SQL's error return?