
Originally Posted by
nikomou
e.g. I have a table with the data:
o2xnet200min
o2offpeak
someotherdata
moredata
evenmoredata
Are those columns in the table, or actual data in it? If the latter, try something like the following:
Code:
$query="SELECT * FROM handset WHERE tariffid LIKE '$tariff2%";
That will return the result that have any matches like $tariff2 (before the end).
Example like what you posted above:
Code:
$tariff2 = 'o2';
$query="SELECT * FROM handset WHERE tariffid LIKE '$tariff2%";
That will return the following:
Hope this helps.
Bookmarks