Hi there ,
I am trying to add links to a Links table using the following code
Title => $diveshop->{name},
URL => "http://",
street => $diveshop->{street},
lat => $gps[0],
lng => $gps[1],
zipcode => $diveshop->{zipcode},
phone => $diveshop->{phone},
fax => $diveshop->{fax},
Contact_Email => $diveshop->{email} }) or print $diveshop->{name}." failed to import: ".$GT::SQL::error."\n";
Needless to say, the script croaked with the following message
<h1>Software error:</h1>
<pre>GT::SQL::Table (14311): Wrong argument passed to this subroutine. $obj->insert(HASH or HASH_REF or CGI)
only. at /var/home/d4drtools/d4dr-tools.com/www/diveshopdemo/mycgi/admin/Links/Table/Links.pm line 37.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.
</p>
[Fri Feb 27 05:31:01 2009] importdiveshops.cgi: GT::SQL::Table (14311): Wrong argument passed to this subroutine. $obj->insert(HASH or HASH_REF
or CGI) only. at /var/home/d4drtools/d4dr-tools.com/www/diveshopdemo/mycgi/admin/Links/Table/Links.pm line 37.Thing is, I think it is time for me to learn what the differences between a hash and a hash_ref are. Since ,apparently, I can't seem to create
one properly. Or if some-one understand what I did wrong in this specific hash/hash_ref (???), please share your knowledge with me
Thanks,
Happy weekend
Sacrifice is not about what you lose,
it is about what you gain in the process.
I am trying to add links to a Links table using the following code
Code:
$linkstbl->add({'CatLinks.CategoryID' => $new_cat_id, Title => $diveshop->{name},
URL => "http://",
street => $diveshop->{street},
lat => $gps[0],
lng => $gps[1],
zipcode => $diveshop->{zipcode},
phone => $diveshop->{phone},
fax => $diveshop->{fax},
Contact_Email => $diveshop->{email} }) or print $diveshop->{name}." failed to import: ".$GT::SQL::error."\n";
Needless to say, the script croaked with the following message
Code:
Content-type: text/html <h1>Software error:</h1>
<pre>GT::SQL::Table (14311): Wrong argument passed to this subroutine. $obj->insert(HASH or HASH_REF or CGI)
only. at /var/home/d4drtools/d4dr-tools.com/www/diveshopdemo/mycgi/admin/Links/Table/Links.pm line 37.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.
</p>
[Fri Feb 27 05:31:01 2009] importdiveshops.cgi: GT::SQL::Table (14311): Wrong argument passed to this subroutine. $obj->insert(HASH or HASH_REF
or CGI) only. at /var/home/d4drtools/d4dr-tools.com/www/diveshopdemo/mycgi/admin/Links/Table/Links.pm line 37.
one properly. Or if some-one understand what I did wrong in this specific hash/hash_ref (???), please share your knowledge with me
Thanks,
Happy weekend
Sacrifice is not about what you lose,
it is about what you gain in the process.