WHERE alternative??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

hi guys, first of all i'm really new to php so i apologize ahead of
time if this is a noob question.

ok, so i purchased and read the PHP for the Wolrd Wide Web by Larry
Ullman and started to write my own script. im trying to write a script
that searches through a company name column (co_name) and returns the
row- simple. here is a snippet:

     if (isset ($_GET['co_search'])){
          $query="SELECT * FROM gcbd WHERE co_name='' ";

        print "<br /><strong>phone:&nbsp;</strong>" .
$retrieverow['phone_num'] . "<br /><strong>company
name:&nbsp;</strong>" . $retrieverow['co_name'] ."<br /><strong>Company
adress:</strong>&nbsp;" . $retrieverow['addy'] . "<br />";

        print "nothing is here";

what im trying to do is have the query return a row if ANY word in
co_name matches $_GET['co_search'] but i cant seem to do that with
WHERE (or WHERE alone). the snippet i posted only returns a row if
co_name matches $_GET['co_search'] EXACTLY. i've searched through the
mysql reference manual but it was difficult for me to find anything i
could understand easily in there. also one more thing, this script will
only return results with isset($_GET['co_search'])(which i thought was
a mistake, but it turns out it will not work any other way) and not
isset($_GET['submit']). if anyone could help a brotha out, thatd be
greatly appreciated. thanks!

Site Timeline