Hi,
        Yes, I tried the mysql_fetch_array() function before using the
mysql_result(). mysql_fetch_array() is ok :)
        Thanks for the sample code.

--gene

On Thu, 30 Mar 2000, Philip G. Apostol wrote:

> how about using mysql_fetch_array() function ?
> 
>                     <?php
>                     $db1 = mysql_connect("localhost", "");
>                     mysql_select_db("mydb",$db1);
>                     $result = mysql_query("SELECT * FROM table1",$db1);
>                     if ($myrow = mysql_fetch_array($result)) {
>                         printf("%s", $myrow["field1"]);
>                     } else {
>                             echo "Sorry, no records were found!";
>                     }
>                     ?>
> 
> hth,
> [EMAIL PROTECTED]
> 




-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to