alejandro52 Posted May 27, 2007 Share Posted May 27, 2007 Is there any way to get data from a row without moving the pointer? Quote Link to comment https://forums.phpfreaks.com/topic/53194-mysql-fetch-row-data-without-moving-the-pointer/ Share on other sites More sharing options...
AndyB Posted May 27, 2007 Share Posted May 27, 2007 Pointer? I thought pointers only applied to sequential data (like text files or tapes) not unordered and random access data. Am I missing something? Quote Link to comment https://forums.phpfreaks.com/topic/53194-mysql-fetch-row-data-without-moving-the-pointer/#findComment-262817 Share on other sites More sharing options...
alejandro52 Posted May 27, 2007 Author Share Posted May 27, 2007 I mean when you use $row = mysql_fetch_row($result) it takes the first row and moves to the other one.when you use it again it does the same. I need to take some data from a row without moving the pointer to the next row. Quote Link to comment https://forums.phpfreaks.com/topic/53194-mysql-fetch-row-data-without-moving-the-pointer/#findComment-262828 Share on other sites More sharing options...
AndyB Posted May 27, 2007 Share Posted May 27, 2007 Then mysql_fetch_array() or mysql_fetch_assoc() may be more appropriate for whatever you're doing. Either that or retrieve specific rows using the WHERE syntax. Quote Link to comment https://forums.phpfreaks.com/topic/53194-mysql-fetch-row-data-without-moving-the-pointer/#findComment-262836 Share on other sites More sharing options...
Diego17 Posted May 27, 2007 Share Posted May 27, 2007 there's mysql_data_seek http://www.php.net/manual/en/function.mysql-data-seek.php Quote Link to comment https://forums.phpfreaks.com/topic/53194-mysql-fetch-row-data-without-moving-the-pointer/#findComment-262844 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.