Re: MySQL Wildcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



function getOptGrps($ID=null){
     if ($ID == "All") {
        $ID = "%"; // % = MySQL multi character wildcard
     }
     $extraClause = "";
     if(!is_null($ID))
     {
         $extraClause = " WHERE OptGrpID LIKE '$ID' ";
     }
     $q = "SELECT * FROM ".OPT_GRPS_TABLE.$extraClause;
     $result = $this->query($q);
     /* Error occurred, return given name by default */
     if(!$result || (mysql_numrows($result) < 1)){
        return NULL;
     }
     /* Return result array */
     $array_results = mysql_fetch_array($result);
     return $array_results;
  }



On May 7, 2010, at 11:46 AM, Karl DeSaulniers wrote:

> ...

--
Onur Yerlikaya




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux