Re: seeking for ! match (apache,php3,mysql)

From: Date: Mon, 05 Jun 2000 18:27:20 +0000
Subject: Re: seeking for ! match (apache,php3,mysql)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-1076@lists.php.net to get a copy of this message
Hi I use something like $query = "select ..."; $result = mysql_query ($query); if (mysql_num_rows ($result) == 0) { // no match } else { // match } That's the tightest I've found... Ryan On Mon, Jun 05, 2000 at 11:56:07AM -0500, Christopher Allen wrote: > > Salut! > > I am looking for a tight way to search for a match to $email_addy. > I am utilizing a mysql database, so what I want to say is: > > $query ="select email_add from user where email_add='$email_addy'"; > then send to server.. > > Then if $query is false meaning no matches then proceed with update etc. > Otherwise there was a match , do something comp[letely different. > > > The deal is that for select queries (per manual) the result returned is > the result identifier not a bool. So Is there a one line $query statement > that I can use to find out match or no match? > > > What has anyone else used in the past/present? > > > Thanks! > > > > Christopher C.M. Allen > Email: callen@driver8.org > Business: 1.715.821.4006 > Home: 1.715.426.6661 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net ---end quoted text---

« previous php.general (#1076) next »