RE: possible to use eregi instead of LIKE

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

 



[snip]
Is it possible to use eregi instead of LIKE to filter mysql queries?

If so can someone do a quick example?
[/snip]

$sql = "SELECT foo, bar FROM table ";
$result = mysql_query($sql, $connection);


while($row = mysql_fetch_array($result)){
   if(eregi('glorp', $row['foo']){
      echo $row['bar'] . "\n";
   }
}


Why you'd want to do it this way beats me, the overhead is a lot bigger
than doing it in the query.

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux