Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 01-09-2007, 02:41 AM
jeet's Avatar
jeet jeet is offline
Contributing Member
Join Date: 03-04-06
Posts: 203
iTrader: 0 / 0%
My mistake...
Change these 2 lines:

$l= $row['total'];

New code:
$r= $row['total'];

Shouldn't have any problem now.
Reply With Quote



Old 01-09-2007, 10:24 AM
Taltos's Avatar
Taltos Taltos is offline
v7n Mentor
Join Date: 11-22-06
Location: Phoenix, AZ
Posts: 1,797
iTrader: 0 / 0%
Edit** Oops, jeet posted fix on next page. I didn't go far enough

I think the problem is in the while loop. You currently have:

while($row = mysql_fetch_array($q)):
$l= $row['total'];
echo $l;

You need to replace the 2nd and 3rd line to something like this:

$l = $l + $row['total'];

Your current total should end up being twice the last selected row's total. The replacement should get you the right total.
Reply With Quote
Old 01-11-2007, 02:59 PM
SN3's Avatar
SN3 SN3 is offline
Senior Member
Join Date: 10-13-03
Location: Work, USA
Posts: 2,795
iTrader: 0 / 0%
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Numbers in domain name SkGold SEO Forum 10 03-29-2007 09:46 PM
Weird Google Numbers bytech SEO Forum 4 04-06-2006 02:13 PM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 07:09 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC