22, November 2008

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

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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


« on: May 03, 2007, 09: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 Visit through proxy

// 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, 09:36:21 PM by chris_middleton »
Kill the googlebot
*
Posts: 6
48 credits
Members referred : 0


« Reply #1 on: May 03, 2007, 09: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: 6440
39464 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: May 03, 2007, 09: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


Last blog : Just a better Internet portal provided by Google
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Nov 22, 2008, 04:32:20 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!


Forum Statistics
Total Posts: 37.737
Total Topics: 7.651
Total Members: 4.397
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Janai

38 Guests, 7 Users online :

11 users online today:



Readers

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