Am Dienstag, den 06.08.2013, 13:56 -0400 schrieb Marty McGlensey:
> Hello,
>
>
>
> I need to write a filter expression for a datasource that includes wildcard
> characters (* or ?). I'd like to filter on this expression name = '*mith'.
> The result should be all records with a name equal to Smith. I'm using MySql
> as the underlying database. The usual wildcards are the * and ?. In MySql I
> have found it to be %.
>
>
>
> Does Gambas support wildcards in filter strings? If so, what are they? Is
> there a work around?
>
>
>
> Thanks,
>
> Marty
Salut Marty,
SQL Wildcards work with LIKE and that has nothing to do with gambas.
your mysql query could be :
Select * from <your Table> Where name like '%mith'
or Select * from <your Table> Where name like '%m%th'
or Select * from <your Table> Where name like '%th'
or Select * from <your Table> Where name like '%t%'
You will always find your Smith too.
or Select * from <your Table> Where name = 'Smith'
--
Amicalement
Charlie
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user