I'm running a simple query that I've done a million times, but the results are wrong and I can't figure out why.
For some reason, even though cat1 or cat2 = $searchcat, a few of the records won't show up. It seems random, but there may be something wrong in the code following the query that puts the records into columns.
Where is the variable $searchcat coming from? Are the results in the same case? is there white_space in the results in the database so it doesnt actully fully equal the value?
When results.php comes up, that is when I find some of the records are missing.
Yes, I made sure there was no white space around the text that is within the cat1 or cat2 fields, going so far as to 1) retype and 2) copy and paste the info from a record that does appear correctly, with no success.
Is register_globals ON? If it's off, you should be using $_POST[searchcat].
Any reason why you seem to have two mysql_fetch's? You seem to call it once at the beginning with fetch_assoc but then do nothing with it. Are you therefore skipping at least one row each time?