Page 1 of 1

[SOLVED] problem in fetching record

Posted: Sat Aug 27, 2005 7:03 am
by itsmani1
i used

Code: Select all

$Res = mysql_query("select ImageId, ImageName, ImageAlt from Images") or die(mysql_error());
$signsNumber = mysql_num_rows($Res);
and found 5 recods.
now i want to access record number 0 and record num 3 from the above 5 records.

howz this possible?

Thanx.
M. Abdul Mannan.

Posted: Sat Aug 27, 2005 7:53 am
by anjanesh
mysql_data_seek

Code: Select all

mysql_data_seek($result, 0);
// ...
mysql_data_seek($result, 3);

Posted: Sat Aug 27, 2005 8:19 am
by itsmani1
Res = mysql_query("select ImageId, ImageName, ImageAlt from Images") or die(mysql_error());

but where is the field name that i will fetch like i want to fetch "ImageName"

Posted: Sat Aug 27, 2005 8:25 am
by feyd
data_seek merely jumps the internal pointers to where you ask it. You'd simply use a mysql_fetch_* function..

Posted: Sat Aug 27, 2005 8:33 am
by itsmani1
okies thans its been solved ....