Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database recall


Guest

Recommended Posts

Hi.

 

Will this command get a value from another place in the same php file $listing['products_info'] and if so, are ther other alternatives for this, how can i pull a value directly from the database?

Link to comment
Share on other sites

Along those lines, what does $order->info['shipping_cost'] do? I'm not very good with php, and I'm trying to solve a problem and I think the solution involves how the shipping cost is stored and retrieved from the db.

Link to comment
Share on other sites

To answer the questions, $listing['products_info'] is an element of an array. An array is a construct which has minimum 2 values/elements up to millions. An array is used to collect data under the same name. E.g. $customer['first_name'], $customer['last_name'] and so on. The benefit is that you can go this array with loops and process the values rather than processing each single variable with it's own name.

 

Most likely this array is the product of a database query. You can view the content of the array by inserting print_r($listing); in the code.

 

$order->info['shipping_cost'] is a part of an object. The property info returns the value shipping_cost of the object $order.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...