Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  avoid sql LIKE in "Search" mode

phpMyEdit General     avoid sql LIKE in "Search" mode
Odoslať novú tému   Odpovedať na tému    
 
uioreanu     Založený: 09.05.2006   Príspevky: 1  
Príspevok Zaslal: 2006-05-09 15:26
Návrat hore  Odpovedať s citátom     

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     Založený: 07.06.2006   Príspevky: 1  
Príspevok Zaslal: 2006-06-07 18:13
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2006-06-08 09:43
Návrat hore  Odpovedať s citátom     

http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.basic-options.html#AEN830

 
siread1     Založený: 14.11.2009   Príspevky: 2  
Príspevok Zaslal: 2009-11-14 16:25
Návrat hore  Odpovedať s citátom     

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     Založený: 14.11.2009   Príspevky: 2  
Príspevok Zaslal: 2009-11-14 16:28
Návrat hore  Odpovedať s citátom     

Gah! After searching for ages I make a post then immediately discover the answer!

'select' => 'N'

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov