in reply to DBD::Mysql select

"I'm it isn't possible to search like this within the mysql query"

Search like what?
It seems to me that you could do something like:

SELECT foo FROM bar WHERE name LIKE '%ME%';

But that's just a guess.
Show us a bit more of the code you have, including the current query that you are using.

Of course, to pull elements from an array that match a certain criteria is quite simple. Something like:

for (@array) { print "$_ matches\n" if $_ =~ /ME/; }

But you'll probably find that you don't need to do that, if you construct your SQL carefully.

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: DBD::Mysql select
by mattdope (Acolyte) on Sep 04, 2006 at 15:05 UTC
    Thanks for those suggestions. I need to search for names that are a certain length (eg 5,6 characters) aswell. Can this be done using mysql?

      Don't mean to sound rude, but did you consider looking in the documentation?

      SELECT some_columns FROM some_table WHERE CHAR_LENGTH(some_column) = 5
      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg