Jump to content


Photo

wild search


  • Please log in to reply
1 reply to this topic

#1 cheryl

cheryl
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 03 February 2006 - 07:02 AM

anyone can help guide or teach on how to do a wild search select statement??

        $member2    = "SELECT m.memCode,m.memName,c.clientName
        FROM member m,client c
        WHERE m.memCode LIKE %_%
        ORDER BY memCode ASC";
        $member_result2 = mysql_query($member2) 
        or die("Couldn't execute query 2.");    


is the following correct?? can also follow up on to print the number of records found and print them in table.

help please.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 February 2006 - 08:32 AM

I'm not sure I understand -- that LIKE clause will return any columns that have at least one character in them, though there's an easier/faster way to do that. You do use % and _ in LIKE clauses, but what are you trying to search on?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users