Sorry if this is a total n00b question, I searched a bit and couldn't find an authoritative answer though (or perhaps I'm not understanding the functions, always a possibility!).
I'm getting a result from a mySQL query and as I loop through the results, I need to make a comparison to one field in the row before and one field in the row after my current row. I need to do this to accomplish something I desire in my output, a background color that changes for a whole table row.
Right now I have working code, but it makes use exclusively of mysql_result(). I know that this is somewhat more expensive/slower than using mysql_fetch_row() or the other "whole row at a time" options available to me. However because those "whole row" options always seem to move the data pointer in the query result object, I'm not sure if I can use them due to my requirement about peeking at the previous and following rows.
Any suggestions?