hi,
following is my problem:
html my.htm
-------------------------------------------------------------------
<table>
<tr><td>
[blk.stat;block=tr;if [val]=='ok';then [rece.rest;p1=[blk.indexno;block=tr];if [val]+-100;then '<img src="topay.gif"/>';else '<img src="payok.gif"/>'];else '']
</td></tr>
</table>
|
php my.php
--------------------------------------------------------------------
<?php
include('tbs.php');
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('my.htm') ;
$BLKSQL = 'select stat,indexno from cont';
$TBS->MergeBlock('blk','mysql',$BLKSQL);
$RECESQL = 'select sum(rest) from rece where contindexno="%p1%" group by contindexno';
$TBS->MergeBlock('rece','mysql',$RECESQL);
$TBS->Show();
?>
|
but,it doesn't work as my thought.
the second [val] in my.htm should be a number of payment, but now the value of two [val] are the same (both are the stat from the cont table)...
what's wrong with my code? or shouldn't i code like that?
help me ,thax a lot,everyone~~