Dynadot โ€” .com Transfer

Php - mysql_query

SpaceshipSpaceship
Watch

smurf22

Established Member
Impact
1
Im creating a search function for this download database and i want it to be able to select downloads for the database if the text entered is like whats set in the database or similiar. I've done this before by selecting all the downloads from the database and then looping and checking them with stristr() but if there are lots of downloads in the database then its going to take a crap load of the resources doing that so i was wondering if anyone knew of a way to do it actually in the query like "SELECT * FROM tbl WHERE text ISLIKE text" or something like that....if that makes sense :-/

thanks
mike
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
mysql can use wildcards so your like would be like '%test%'

this would match the following:-

test
testing
atest
atesting


etc
 
1
•••
ahhhh thanks alot i'll try that now

EDIT: got it working thanks alot! rep added
 
Last edited:
0
•••
no problem glad to have helped
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Spaceship
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back