Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

select a single value from DB, not an whole array


sandrine

Recommended Posts

hi forum

i need to select just a single value from the DB; and not a whole array. i couldn?t found a function for this in the database.php-file.

 

with tep_db_fetch_array, i fill an array, but i need just this single $customers_id.

 

Does someone knows the oscommerce function for this?

 

$customers_id_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "'");
$customers_id = tep_db_fetch_array($customers_id_query);

echo $customers_id;

 

 

nice greetings

sandrine

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...