Akopia Akopia Services

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

Re: [mv] Help! Still Lost in Perl



******    message to minivend-users from Chris Rapier <rapier@psc.edu>     ******



Hans-Joachim Leidinger wrote:

> Did you get any message in your error.log file?
> In my experience with any written perl stuff of me, if something is
> wrong in my codes, i get a message with a part of my codes my error.log
> file. The error.log file is my friend.

Joachiim is full of good advice. I just checked the error.log and
found...

----

10.1.1.2 k7BtxBgi:10.1.1.2 - [25/March/2000:16:41:30 -0500] SCC
/cgi-bin/SCC/process.html Runtime error: Can't call method "open_table"
on an undefined value at /usr/home/rapier/mvend/lib/Vend/Data.pm line
762.
> 
adsl-151-201-20-18% tail -20  error.log
> if ((!$cart_sku) || (!$column)) {
>   return "cart sku is $cart_sku and column is $column<br>";
> }
> $db_quantity = $ref->field($column, $cart_sku);
> $difference = $db_qauntity - $cart_quantity;
> if ($difference < 0){
>   $Items->[$i]{'quantity'} = $db_quantity;
> }
> if ($difference > 0) {
> #  $ref->inc_field($column, $cart_sku, -1);
> } 
> if ($difference == 0) {
> #  $ref->delete_record($cart_sku);
> }
> $i++;
> return "db_quant is $db_quantity, cart_quant is $cart_quantity,  sku is $cart_sku, column is $column, difference is $difference<br><br>";               
> 
> 
10.1.1.2 k7BtxBgi:10.1.1.2 - [25/March/2000:16:41:30 -0500] SCC
/cgi-bin/SCC/process.html Runtime error: Can't call method "open_table"
on an undefined value at /usr/home/rapier/mvend/lib/Vend/Data.pm line
762.
> 

---

By putting in a breakpoint I confirmed that the line
$ref = $Db->{products}
Isn't actually doing anything like I expected. :P

Now, I know I have a database called products because I reference it
elsewhere in the site. Obviously I'm doing something wrong with
[perl tabels="products"]
$ref=$Db->{products};

But I don't know what.
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: