View Single Post
  #2 (permalink)  
Old February 14th, 2007, 09:27 AM
ciderpunx ciderpunx is offline
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Code:
my $parameters            = shift;
...
@cursor = $self->{SQL}->query("select id from location.resorts where name = ?", $parameters->{name});
Hey Craig,

You've created a local variable called $parameters which is a scalar (because you've called it like this: $resortid = $func->getresortid($resortname); where $resortname is a scalar, not a hashref) then you treating it as if it was a hashref. Try something like:

Code:
@cursor = $self->{SQL}->query("select id from location.resorts where name = ?", $parameters


--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
Reply With Quote