| Index
» Projects
» phpMyEdit
» Forum
» avoid sql LIKE in "Search" mode |
 |
uioreanu
Joined: 09 May 2006
Posts: 1
Posted: 2006-05-09 15:26
Back to top
Reply with quote
|
I have a status field called istatus which can have values from 0 to 100. My problem is that when I try to search for the 0 value, it matches 10 as well, because the query goes like: field like '%0%'; and 10 matches to that query. How can I easily setup the fdd fields so that the LIKE query is replaced with an exact SQL search?
I'm sorry if this was answered before but I couldn't find it.
|
mattpaul
Joined: 07 Jun 2006
Posts: 1
Posted: 2006-06-07 18:13
Back to top
Reply with quote
|
for something like this, the field type should not be a varchar string but an int. then your SELECT statement's WHERE clause becomes:
... WHERE istatus=0
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2006-06-08 09:43
Back to top
Reply with quote
|
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.basic-options.html#AEN830
|
siread1
Joined: 14 Nov 2009
Posts: 2
Posted: 2009-11-14 16:25
Back to top
Reply with quote
|
I am having this problem. I have checked my database and most of my field types are INT (11) but searches always do LIKE '*?*'.
How can I change this?
|
siread1
Joined: 14 Nov 2009
Posts: 2
Posted: 2009-11-14 16:28
Back to top
Reply with quote
|
Gah! After searching for ages I make a post then immediately discover the answer!
'select' => 'N'
|
|
Post new topic
Reply to topic
|
|
|
|