that should ofcourse be if(!$count=mysql_numrows($query))  {...

(put a ! directly infront of $count

-----Original Message-----
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:42
To: 'Rafael Faria'; [EMAIL PROTECTED]
Subject: RE: [PHP] Count....


Lookup the mysql_numrows function (think that's the correct spelling, I'm
using Oracle now ;-) - and go from there. Put in an

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      }

for example, and put that directly below your $query = mysql_query... line.

Maybe make it like this instead:

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      } else {
           while ($row ....

etc.

I never decided on those elses and elseifs :)

Regards,
Henning Pedersen
Funcom Oslo


-----Original Message-----
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:36
To: [EMAIL PROTECTED]
Subject: [PHP] Count....


I'm doing a seach function... everything is ok....but i wanna put something
like "Use more specific terms" when the search don't have anything to
show..... but i can't do that.... can someone helpme?

i'm doing that!
=================

         $query = mysql_query("select * from Newsletter_Members where
Newsletter_Members.email like '%$search%' order by id");

              while ($row = mysql_fetch_row($query)) {

                 echo "<tr bgcolor=#DDDDDD>\n";
                 echo "<td align=center><input type=checkbox name=id[]
value=$row[0]></td>\n";
                 echo "<td align=center><font size=2
face=verdana>&nbsp;$row[0]&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana>&nbsp;<a
href=mailto:$row[1]>$row[1]</a>&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana><a
href=\"javascript:openwin('editmember.php?email=$row[1]&id=$row[0]','adicion
ar','400','110')\">Editar</a></font></td>\n";
                 echo "</tr>\n";

              }

===================

how can i make if doen't match anything say "it doen't match anything" ?






---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to