Akopia Akopia Services

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

Re: [ic] Delete row + Column does not exist



Hi all,

Thanks for the delete_column idea (from Ed), now it works for me as:  

[tag flag write]current_table[/tag]
  [perl tables="current_table"]
    $ref = $Db{current_table}; #set reference
    $cart_sku = $Values->{'current_key'};
    $ref->delete_record($cart_sku); #delete the record from the database
  [/perl]

----
New problem:
I created this to check something is the row:

[tag flag write]current_table[/tag]
[perl tables="current_table"]
  $ref = $Db{current_table}; #set reference
  $cart_sku = $Values->{'filename'}; #this is the row we have to check
  
  #if record does not exist, we have to do something
  $ref->record_exists($cart_sku) or do { I_have_to_do_something; return; };
  
  #record exists. 
  do some other checks in the row...
[/perl]

It works well if the row exists.
But when the row does not exist, I got this error message:

a.b.c.d cMyY6HKo:a.b.c.d - [15/March/2001:12:07:28 +0200] ctlg /cgi-bin/ctlg/process Safe: There is no column named
'x' at /local/mvend/lib/Vend/Table/Common.pm line 217.                                                                    

How can I handle this problem? (Exeption handling? Other setting in [perl] tag?)

Thanks,
Tamas





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


Search for: Match: Format: Sort by: