[FX.php List] search on a number field with text
Michael Layne
fx at 9degrees.com
Fri Mar 10 21:03:01 MST 2006
Hi,
perhaps just use a bit of JavaScript to validate that it's a number
before querying the DB.
Should solve at least the problem...
Someone wrote:
> Hi,
> It's been awhile since if posted. Just started a new project.
> Not sure if this has come up.
>
> During testing by accident a added some text to a number
> (searchone.php?arin_invnum=204587aaa)
>
> And did an equal search.
> $FXQuery->AddDBParam('arin_invnum', $_GET['arin_invnum'],'eq');
> $ReturnedData = $FXQuery->FMFind();
>
> Strange result. It found the record where the field 'arin_invnum'
> (number field) is 204587
>
> So I decided to test the find with the field 'arin_invnum' as a text
> field and got a different result. Found Count ZERO.
>
> Interesting.
>
> Frank
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list