Zen Follower
- Join Date:
- Jan 2010
- Posts:
- 182
- Plugin Contributions:
- 0
Batch Form print - with comments on screen
Hello -
When say 100 orders come in, 35 may have comments. We then may print 10 of those. Having the comments in Batch Form Print makes this a one process step.
I've been working at this a while and cannot get the 1st comment to be generated in the extra column I created in Batch Form Print.
Here is what I have so far and it's generating --none-- , so at least it's half there...
<td class="dataTableContent" align="left">
<?php
//--Add comments starts--
$orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments
from " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . zen_db_input($oID) . "'
order by date_added limit 1");
//--Add comments ends--
echo ($orders_history->fields['comments'] == '' ? TEXT_NONE : nl2br(zen_db_output($orders_history->fields['comments']))) ?></td>
I am assuming I have the execute code in the wrong location. any help?