Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Create a Simple Checklist Report / SQL help


Recommended Posts

Hi, I'm trying to create a simple report based on products sold. We have a retail store and when a product sells we need to manually update our displays and update our ebay listings. I've been using a paper form, but since this information all resides in the orders_products table, I figured it would be much easier (and more accurate) to create a checklist 'report' based on that table.


So far, by modifying an existing add on report "products purchased with date range" (http://addons.oscommerce.com/info/2568) I've been able to generate the check list, but I would really like to be able to check off each task and have it written to the database.


I've created extra fields (display_update, ebay_update) in orders_products to work with.


I'm out of my depth, but I'm hoping that there is some guru out there that can point me in the correct direction.


Here's what I've got so far:


This is what I've written to create the checkboxes and grab the info from the db - which is working:


<td class="dataTableContent" align="center"> 
<input type="checkbox" name="ebay_update[]"<?php if ($products['ebay_update'] == 1) echo "checked='checked'"; ?>"/> </td>
<td class="dataTableContent" align="center">
<input type="checkbox" name="display_update[]"<?php if ($products['display_update'] == 1) echo "checked='checked'"; ?>"/> </td>


I wrapped the whole thing in a submit form, and then I attempted to grab the check boxes like this, but its not working at all.


//begin db input - totally not working at all   
          $ebay_updates = $_POST['ebay_update'];

          foreach($ebay_updates as $ebay_update){
              echo $ebay_update." <br />";

$products_updates = "INSERT INTO " . TABLE_PRODUCTS . "(op.ebay_update, op.display_update) values ($ebay_updates, $display_updates)";



Anyone have any ideas? Any help would be much appreciated.


Thanks, Christa

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...