DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Yubnub "dbsearch" Command To Search MySQL Data

11.04.2005
| 2434 views |
  • submit to reddit
        
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=
<?php
$compare1 = substr($path, 0, 7);
if ($compare1 == "http://"){
echo $path.'db_search.php?search_option=1&submit_search=Go&db='.$db.'&search_str='.$search;
}

if (!$link = mysql_connect('', '', '')) {
   echo 'Could not connect to mysql';
   exit;
}

if (!mysql_select_db('yub', $link)) {
   echo 'Could not select database';
   exit;
}
$sendto1 = mysql_query("select email from yubmail where mail_alias = '$path'");
$sendto2 = mysql_result($sendto1, 0);
echo $sendto2.'db_search.php?search_option=1&submit_search=Go&db='.$db.'&search_str='.$search;
?>
">
    

Comments

Snippets Manager replied on Mon, 2012/05/07 - 2:16pm

These codes you've been posting are quite trivials :D