is it a web site error ?
| From: | anna zhao | Date: | Mon, 29 May 2000 01:51:32 +0000 |
| Subject: | is it a web site error ? | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-686@lists.php.net to get a copy of this message | ||
Hello,
I am newer for php, so I learn it from your site, when I read it from URL http://www.php.net/manual/function.mysql-data-seek.php,the example use function mysql_fetch_object ($result), but I could not found anywhere about this function, I can find :mysql_field_object mysql_fetch_field mysql_fetch_row function from book professional PHP Programming write by Hesus Castagnetto Etc. I attch example as below: 2 <?php
3 $link = mysql_pconnect ("kron", "jutta", "geheim") {
4 or die ("Could not connect");
5 }
6
7 mysql_select_db ("samp_db") {
8 or die ("Could not select database");
9 }
10
11 $query = "SELECT last_name, first_name FROM friends";
12 $result = mysql_query ($query) {
13 or die ("Query failed");
14 }
15
16 # fetch rows in reverse order17
18 for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) {
19 if (!mysql_data_seek ($result, $i)) {
20 printf ("Cannot seek to row %d\n", $i);
21 continue;
22 }
23
24 if(!($row = mysql_fetch_object ($result))) 25 continue;26
27 printf ("%s %s<BR>\n", $row->last_name, $row->first_name);
28 }
29
30 mysql_free_result ($result);31 ?> please take look the line 24, it is important for me, because I just learn about it, please help, tell me about it, thanks a lot anna ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com