Hi Nathan :

 Thanks for the help look, I read the php.net manual and use the
mysql_num_rows(); function, and I write down this script, did you think
is good enough.

Thank.


<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?php

$db = mysql_connect("localhost", "root");
mysql_select_db("Stsdb",$db);
//$sql = "SELECT * FROM urls where (tipo='bsc') order by nombre asc";   
$result = mysql_query("SELECT * FROM urls where (tipo='bsc') order by
nombre asc"); 
$num_rows = mysql_num_rows($result); 

if ($num_rows==0){
echo "no results from the query";
}
else{ ?>
<? while ($myrow = mysql_fetch_array($result)) {  ?>
 <A  href="<? echo $myrow["URL"]; ?>" target=new_window><? echo
$myrow["Nombre"] ; ?></A>        <div align="right">..:: Edit</div>
<? } ?>
<?
echo "$num_rows Rows\n";
}
?>

</body>
</html>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to