Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add a comment to the database


Guest

Recommended Posts

New problem, fairly easy. I have an upload script that appends the order status to 'Pending'. I also want to add a comment to the order, preferably including the date and time the new file was uploaded into the comments section of the order. Here is the code I thought would work for adding info to the comment for the order.

 

        tep_db_query("insert into orders_status_history comments value 'New Files have been uploaded'");

 

Yea... not so much with the working. I'm not good at db queries. Help if you can. Thanks.

Link to comment
Share on other sites

Instead if your line above try this:

 

$comment_input = 'New Files have been uploaded: ' . now();

$sql_data_array = array('comments' => $comment_input);

tep_db_perform('orders_status_history', $sql_data_array);

 

You will need to format the value of now() to what you want - but you get the jist.

Your online success is Paramount.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...