You need to pass in the value to execute, and
not prepare, like:
my $value = 'book';my $sth = $dbh->prepare('SELECT id, category FROM table WHERE category LIKE ?');
$sth->execute($value);
The reason why you do this is so that you can re-use
the prepared SQL query more than once (if you wish)
giving it different values each time. With some databases
the pre-preparing the queries and reusing them can save
alot of time.
Also unless you're doing any kind of wild-card matching,
you'd probably want to use = rather than LIKE in the
SQL query above.