Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP Search Wildcard Problem

New Here ,
Nov 16, 2006 Nov 16, 2006
I'm searching using 1 text box and two dynamically loaded lists. The lists work fine and the text box finds the correct field IF the whole string is inserted. It will not do partial string returns. Also, how can I default the text box to % without having the symbol appear? Using DW 8.02.
TOPICS
Server side applications
255
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2006 Nov 16, 2006
LATEST
I found the fix. It involved stripping out most of the extra formatting code inserted by DW:

$var1_Recordset2 = $_GET['sname'];
$var2_Recordset2 = $_GET['class'];
$var3_Recordset2 = $_GET['stimezone'];

mysql_select_db($database_mt_connect, $mt_connect);
$query_Recordset2 = "SELECT * FROM mt_students WHERE sname like '%%%$var1_Recordset2%%' and class like '$var2_Recordset2' and stimezone like '$var3_Recordset2'";
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines