Quote:
Originally Posted by ruteckycs
Make sure you WHERE clause is being met.
|
The WHERE clause isn't giving me any problems, the count of the rows is always spot on.
I'm wondering actually if if has to do with the new version 5. I do a num_rows and end up with 15, do an echo and get 14. Run the allocation script and I end up with 1 record every time, and no way will it allocate that one row!
I have been refining the script today, trying to work out why it won't show the one record and every time I get the same result. Even when I just do a straight-forward query, there's always one record missing from the list.
I use a simple form input to generate the var for limit and all the actions, which are separated for so I can see what is happening. There are several commented lines where I have been trying different approaches to this problem.
Here is the script that I have got to now, maybe it will give some idea of what is happening:
Result = 14 records, one short every time, So I call it again when the form returns the next part of the script:
Call to show results: Only 14 Records show up. Then the script randomizes and copies them to the race db:
Move the results into the race table: 14 Records of the 15 copy across to the table. Then I display the results of that table:
and it only shows 13! Using phpMyAdmin, I can see that 14 records were copied across, and that one record remains in the main db as unchanged, so why can't I get them to show up properly?
Never had a problem like this before with MySQL, and although I was working with version 4 when I started this project, I have since gone to version 5.1, since the host I use now uses that version.
It has me completely confused at the moment, nothing I do changes it to show that missing record. I even tried -1 on the limit, but that doesn't work any more, you can see manipulations of the limit and number vars to see if that would make a difference, but nothing does.
Any ideas?