john80988
asked on
php get value of specific row and column from array of db
say i retrive a table select * from xxxxx
if there any simple way that say
$value = $dataRecord...; ( which i can direct specific a row and column )
like row 0 column 1 or row 0 column "title"
expert please help
if there any simple way that say
$value = $dataRecord...; ( which i can direct specific a row and column )
like row 0 column 1 or row 0 column "title"
expert please help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Because MySQL will 're-use' empty space in it's tables, the order of rows is only predictable if you use an ORDER BY clause. ORDER BY tells MySQL to sort the results by a particular column and return them in that order. If your table is having additions and deletions, the data you are looking for will not necessarily be in the same numerical row each time.
It is usually best to find a different way to identify the data you want to retrieve.
It is usually best to find a different way to identify the data you want to retrieve.
http://us2.php.net/manual/en/function.mysql-data-seek.php
some code might be like -
Open in new window
but you can get different amount of rows from a select, You may need to use the mysql_num_rows($result) to get the Range of the amount of rows