2012-02-15 7 views
0

私には電子メールを送信するperl test.plページがあります。電子メールには、htmlページlinkfromTest.htmlへのリンクが含まれています。PerlからInterchangeのHTMLへの転送/ SQLクエリ出力値の使用

(インターチェンジインターチェンジ開発グループのホームページが提供するPerlで書かれたWebベースのアプリケーションフレームワークです:。http://www.icdevgroup.org/i/dev

しかし、私はtest.pl「からSQLクエリの結果を使用する必要があります$ REF- > {'outofstock_prod'} 'は、linkfromTest.htmlページでSQLクエリを実行するために必要です。あなたがスクラッチ空間に一時変数を設定してみてください可能性が事前

答えて

0

test.pl 

$sql = "select OS.id,OS.name,OS.date,OS.customer_email,OS.product as outofstock_prod,OS.salesperson_email,OS.salesperson 
    from outofstock_sku as OS 
    where mail_sent='0' 
    order by OS.id"; 

$ref->{'outofstock_prod'} 
...... 
...... 
print MAIL "More items potentially matched.\n\n"; 
print MAIL "Click here to view more items : http://qqq.qqqq.com/linkfromTest.html\n\n"; 
..... 




linkfromTest.html 


    [query list=1 sql="select P.sku,P.manufacturer,P.category,P.scat,P.description,P.imgid 
       from 
       products AS P LEFT JOIN inventory AS I 
       ON (I.sku = P.sku AND I.status = 'A') 
       WHERE P.manufacturer LIKE '$ref->{'outofstock_prod'}'' 
       LIMIT 0,4;"]  

感謝。 linkFromTest.htmlで

$Tag->tmp('outofstock_prod'); # remove this when done 
$Scratch->{outofstock_prod} = $ref->{outofstock_prod}; 

次に、::test.plで

[query list=1 sql="select P.sku,P.manufacturer,P.category,P.scat,P.description,P.imgid 
      from 
      products AS P LEFT JOIN inventory AS I 
      ON (I.sku = P.sku AND I.status = 'A') 
      WHERE P.manufacturer LIKE '[scratch outofstock_prod]' 
      LIMIT 0,4;"] 

(そうでない場合は、私は、またはそのoutofstock_prodフィールドに何が含まれているか$refが何であるかわかりません。文字列の場合は、文字列を作成してから貼り付けてください。)

関連する問題