in reply to Re^4: Search 2 columns
in thread Search 2 columns

my $column = ( $type eq 'alpha' ) ? 'name' : "CONCAT_WS(' ',keywords,category)";
It's just a compact way to write if (..) {} else {}. Look for Ternary "?:" in perlop.
my $query = "SELECT name, address, city, phone FROM valley ". "WHERE $column LIKE ? ORDER BY name LIMIT ?,?";
The concept of Placeholders and Bind Values is fairly well described in the DBI documentation.
--
Andreas