The problem is that your SQL has an error in it. Look at the cpan docs for DBI. It has information on error catching and using place holders. you put $client straight in the SQL which means it won't be qouted, which is why you get the error.
The following code should at least be closer to what you want. Usering placeholders is very important for security so you should learn to alway always always use them.

| Code: |
| <br /> my $query = "select id, sn, name, website from users where sn = ?";<br /> my $sth = $dbh->prepare($query);<br /> $sth->execute($client);<br /> |
[right][snapback]47361[/snapback][/right]