THREADJACK!
Anyone here know much about php?
I need to ask something that I can't figure out.
(,
Mon 28 Jun 2004, 0:16,
archived)
Anyone here know much about php?
I need to ask something that I can't figure out.
I'm pulling a bunch of results out of a database, and using "mysql_fetch_array" to get an array out of them.
I want to know how to start at, say, the 10th row/array in the result set, rather than starting at the first one.
That make sense?
(,
Mon 28 Jun 2004, 0:28,
archived)
I want to know how to start at, say, the 10th row/array in the result set, rather than starting at the first one.
That make sense?
$query = "SELECT * FROM ????;";
$result = mysql_query($query,$myDB);
while($row = mysql_fetch_array($result,10))
Where ???? is your array
(,
Mon 28 Jun 2004, 0:37,
archived)
$result = mysql_query($query,$myDB);
while($row = mysql_fetch_array($result,10))
Where ???? is your array
I was just looking in the online php manual thing at "mysql_data_seek" and trying to work that out.
But if that'll work, bargin!
Thanks
(,
Mon 28 Jun 2004, 0:40,
archived)
But if that'll work, bargin!
Thanks
mysql, but could you not use mysql_data_seek to move the pointer to the row, and then mysql_fetch_row() / mysql_fetch_array.
(,
Mon 28 Jun 2004, 0:37,
archived)
i'll give that a try too if the other two ideas here dont work.
(,
Mon 28 Jun 2004, 0:42,
archived)
LIMIT in the mysql-query. e.g.: SELECT * FROM table LIMIT 9,5 for selecting rows 10-15.
dev.mysql.com/doc/mysql/en/SELECT.html and search for LIMIT.
(,
Mon 28 Jun 2004, 0:40,
archived)
dev.mysql.com/doc/mysql/en/SELECT.html and search for LIMIT.