search results
Moderator: General Moderators
search results
I am working on some search results from a database and I have encountered the next problem:
If it is entered Alimentation I have to find all the results,if it is entered "alimen" all the results for the exact word alimen(not alimentation).
The problem is in the database I have strings like Alimentation Company,Home Delivery.Could you help with this because I can't use LIKE or substr().
I have searched for topics like this but none helped me.
If it is entered Alimentation I have to find all the results,if it is entered "alimen" all the results for the exact word alimen(not alimentation).
The problem is in the database I have strings like Alimentation Company,Home Delivery.Could you help with this because I can't use LIKE or substr().
I have searched for topics like this but none helped me.
i don't know if really understood it properly but you try this
Code: Select all
SELECT field1, field2 WHERE checkField='alimen'i will say this different:
how can I search a field without using LIKE.
I have in one field:
[Alimentation,Delivery]
If I enter Alimentation I need to find that field between the results.
If I enter Alimen that field it's not in the result I am searching for.
I can't say where checkfield='alimentation' because it will find me nothing
I can't say where checkfield LIKE 'alimen' because it will find me that field and I don't want that.
If it's entered 'alimen' I need to be able to say that no results are found and if it's entered 'alimentation' I need to find this result.
how can I search a field without using LIKE.
I have in one field:
[Alimentation,Delivery]
If I enter Alimentation I need to find that field between the results.
If I enter Alimen that field it's not in the result I am searching for.
I can't say where checkfield='alimentation' because it will find me nothing
I can't say where checkfield LIKE 'alimen' because it will find me that field and I don't want that.
If it's entered 'alimen' I need to be able to say that no results are found and if it's entered 'alimentation' I need to find this result.
Last edited by sebs on Mon Oct 03, 2005 5:29 am, edited 1 time in total.
if I am getting you right this time around you can perhaps take a look at
Code: Select all
SELECT col1, col2 FROM Table WHERE checkCol REGEXP '[[:<:]]word[[:>:]]';try this
Code: Select all
"SELECT macro FROM firme WHERE macro REGEXP '[[:<:]]".$categ."[[:>:]]'; "