PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Yes I know there are many to choose from, and are better written but I am trying to create my own to learn. This code returns an multiple deminsion array with all the results but the last record always returns null values. I have created a identical one with mysql and everything works well. I am sure the last row has data (if I limit the results to 10, 9 have data if I limit the same code to 5, 4 have data). Obviously I am not showing all the functions, all are returning the correct data. I think it has todo with the for loop. Any thoughts.
Check your GetNumRows() function in that class. It could be that it returns "naturally" counted rows (starting with 1, 2, 3, etc.) while your array starts with 0,1,2,3 etc.
I believe you are right! As I take a detailed look at the return results it's the first line that is not being returned therefore the last line has no data.
The GetNumRows() returns an integer, value of 10 in this case.
Later that same evening...
Actually I was using ( mssql_fetch_assoc( $this->qry ); ) for testing earlier in the code and had forgotten to take it out. No eyes to see my owns mistakes.