Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

[ic] RE: Interchange-users digest, Vol 1 #319 - 19 msgs



The database definitely exist because I'm able to access
thru the [loop  search="st=db/fi=product_cat ... "] method.
And I logged into mySQL database manually and checked.

Just to confirm the syntax is
[perl table=<table name> interpolate=1]
  my $db = $Db{<database name>};

or is it
[perl table=<table name> interpolate=1]
  my $db = $Db{<table name>};

I've tried both methods above and still get the same error.
I know what you mean by not getting the DB set.
I'm not set up properly somehow but what?


Quoting Annie Flippo (aflippo@lunamedium.com):
>
> My example is:
>
> <html>
>
> Going into perl.<br>
>
> [perl tables=product_cat interpolate=1]
>     my $db = $Db{product_cat};
>

      if(! $db) {
	  Log("product_cat database doesn't exist!");
	  return;
      }

You aren't even getting the DB set. The error "can't call method on
undefined
value" says that the $db is not set. Obviously something is missing....like
a Database product_cat .. something or other.

Once that is done, I think you have to do:

	my $set = $db->query(....);

The query method returns an array reference, not an array.

Then it should work.




_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: