28, May 2012

Error .: Undefined index: order_id :. - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: Error .: Undefined index: order_id :.
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Error .: Undefined index: order_id :.  (Read 1693 times)
Kill the googlebot
*
Posts: 6
48 credits
Members referred : 0


« on: May 03, 2007, 08:34:11 pm »

just "installing" yourcart for the first time and have set up all the db's etc and now when executing it returns this error: http://www.chrismiddleton.co.uk/rock/classes/db_cart/db_cart_example.php

// show total value of the current cart
   function show_total_value() {
      $sql = sprintf("SELECT SUM(quantity * price) AS total FROM %s WHERE order_id = %d", ORDER_ROWS, $_SESSION['order_id']);
      if (!$result = mysql_query($sql)) {
         $this->error = $this->messages(1);
         return;
      } else {
         $total_amount = mysql_result($result, 0, "total");
         mysql_free_result($result);
         return $total_amount;
      }
   }

Any help much appreciated,


Thanks,
Chris Middleton
« Last Edit: May 03, 2007, 08:36:21 pm by chris_middleton »
Kill the googlebot
*
Posts: 6
48 credits
Members referred : 0


« Reply #1 on: May 03, 2007, 08:46:52 pm »

having just gone back through my db's i realise its something i have missed out. Sorry for wasting your time!!

Chris
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: May 03, 2007, 08:59:38 pm »

having just gone back through my db's i realise its something i have missed out. Sorry for wasting your time!!

Chris

you didn't  Cheesy

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6503
Tags : db_cart error Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: Error .: Undefined index: order_id :.
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 10:23:19 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.