Question about SQL statement
I have a question about the possible string match in sql statement, for example I have variable "$val=abc", I can write:
SELECT * FROM table WHERE field like '%$val%'
this will list all recoreds that the field contains sub-string "abc".
Now the question is: if I have a string for example "$val=893abc82", is it possible to "partial match" the field in sql statement and populate the same records? in other words, if the DB field data has the same substring as those from the variable, then list those records? is it possible? thanks for any advice.
michael123
Junior Poster in Training
94 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0