Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need to get fax number on Invoice


Enzo_UK

Recommended Posts

Posted

I need a way of getting the Fax number displayed on the invoice, but am having a few problems...

 

The main problem is the Fax number is not stored in the table 'orders' along with the rest of the customer details when they place the order, it just stays in table 'customers'

 

Any help is greatly appreciated.

Posted

I have finally come up with a way to do it... its probably not the greatest of ways, but it works...

<?php
$sql="SELECT customers_id FROM orders where orders_id = '$oID'"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $customer_id = $row["customers_id"]; }
$sql="SELECT customers_fax FROM customers where customers_id = '$customer_id'"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $customer_fax = $row["customers_fax"]; } echo ("$customer_fax");
?>

 

If anyone has got a way of tidying that up at all, please let me know.

Archived

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

×
×
  • Create New...