[ic] Stock Notification System that works - maybe not elegant :)

Kevin Walsh interchange-users@interchange.redhat.com
Fri Mar 22 09:00:01 2002


>
> I´ve tried to use your code. Seems that table  created OK but, when I submit
> the stock_alert.html and loads stock_alert_added.html which means that write
> data in the created stock_alert table, it writes nothing and I can see this
> error in error.log
>
> ----------------------------------------------------------------------------
> -----
> localhost.localdomain yC9hgJoj:localhost.localdomain -
> [22/marzo/2002:13:14:49 +0100] cc /cgi-bin/cc/process.html Safe: Can't call
> method "query" on an undefined value at (eval 577) line 14.
>
>
>
>  $sql_req = "
>  INSERT INTO stock_alert SET
>  sku = '$Values->{bo_sku}',
>  price = '". $Tag->filter('sql', $Values->{bo_price})."',
>  description = '". $Tag->filter('sql', $Values->{bo_description})."',
>  author = '". $Tag->filter('sql', $Values->{bo_author})."',
>  fname = '". $Tag->filter('sql', $Values->{fname})."',
>  lname = '". $Tag->filter('sql', $Values->{lname})."',
>  email = '". $Tag->filter('sql', $Values->{email})."',
>  date = '$Scratch->{bo_time}'
>  ";
>  $Db{stock_alert}->query("$sql_req");
>  return;
>
Most likely, you didn't create a dbconf/mysql/stock_alert.mysql
file, or one for PostgreSQL, or whatever, when you created your
table.  If you did then check the file permissions and reconfig
the site ("apply changes" or restart Interchange etc.)

--
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/