|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Im using a Mysql server and Perl to access it, to search for a complete string is cake, but i wanna search for like an 'a' and that it gives back 'bakes', 'blaa'. How can i get Perl to use wildcards to search?
my $SQL = "select * from Document where ($cgi_data{'Zoekoptie'} = '$cgi_data{'zoek'}')"; where 'Zoekoptie' is the search parameter and 'zoek' is table you wanna search. PLease give me some advice so i can search. Tnx in advance. BuTcH! |
|
#2
|
||||
|
||||
|
Hi you can use wildcard to serch.
You may use wildcard `%' or `_' for searching eg; To find names beginning with `a': mysql> SELECT * FROM tblname WHERE name LIKE "a%"; To find names ending with `a': mysql> SELECT * FROM tblname WHERE name LIKE "%a"; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Searching in MySql using Perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|