Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 8. december 2024
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Adding column values together.

phpMyEdit General     Adding column values together.
Odoslať novú tému   Odpovedať na tému   Choď na stránku 1, 2, 3, 4, 5, 6, 7  Ďalší  
 
oldwolfe     Založený: 18.05.2009   Príspevky: 2  
Príspevok Zaslal: 2009-05-18 04:06
Návrat hore  Odpovedať s citátom     

Greetings to the forum Members.

I need some assistance with adding integer values together in a column. I am only using one table.

An Example

Values are input into this column named- FuelAmtLtrs

FuelAmtLtrs
0
0
30
5
0
7

and have the results obtained inserted to another column
named TotalFuelAmtLtrs


0
0
30
35
35
42

Basically a progressive sum.

Since my original post I have managed to create a query to get the sum of the amounts of fuel purchased and this query works in phpmyadmin

SELECT `TotalFuelAmtLtrs`,SUM(`FuelAmtLtrs`) FROM TA
GROUP BY `TotalFuelAmtLtrs`

Basically the sum of all column values.

How do i incorporate this query into index.php?

Regards
oldwolfe

 
oldwolfe     Založený: 18.05.2009   Príspevky: 2  
Príspevok Zaslal: 2009-05-20 11:53
Návrat hore  Odpovedať s citátom     

$opts['fdd']['FuelAmtLtrs'] = array(
'name' => 'FuelAmtLtrs',
'select' => 'T',
'maxlen' => 11,
'sort' => true
);
$opts['fdd']['TotalFuelAmtLtrs'] = array(
'name' => 'TotalFuelAmtLtrs',
'select' => 'T',
'maxlen' => 8,
'sort' => true
);

$dbhandle3 = mysql_connect('localhost', 'username', 'pass');

if ($dbhandle3 == false)
{
die ("Unable to connect to MySQL Database<br>");
}

$db = mysql_select_db('klms');

if ($db == false)
{
die ("Unable to Select MySQL Database<br>");
}

$dbquery3 = 'SELECT `TotalFuelAmtLtrs` , SUM( `FuelAmtLtrs` ) FROM TA '
. ' GROUP BY `TotalFuelAmtLtrs` LIMIT 0, 30 ';

$dbresult3 = mysql_query($dbquery3, $dbhandle3);

if ($dbresult3 == false)
{
die ("Unable to to perform query<br>");
}

while ($dbrow3 = mysql_fetch_row($dbresult3)) {
foreach($dbrow3 as $key => $value) {
print "Total Fuel Used Is " . "$dbrow3[$key]" . " ";
echo "<br>";
}
}

I have found a partial solution from Techotopia which calculates the column sum and displays them above the table. I would like to place the value of
$dbrow3($dbresult3) back into the column TotalFuelAmtLtrs.

Can anyone assist.

Regards
Oldwolfe.

 
VSmith     Založený: 07.09.2020   Príspevky: 1  
Príspevok Zaslal: 2020-09-07 09:20
Návrat hore  Odpovedať s citátom     

Platon's technology is a website that has a source software to download. It has a general adding of column values together. You can check rush my essay discount code to learn more new simple methods to learn more education. They also have a table which summarize to obtain result of total fuel etc. Join their website for more information.

 
kanla     Založený: 21.01.2022   Príspevky: 2  
Príspevok Zaslal: 2022-01-21 12:03
Návrat hore  Odpovedať s citátom     

CPP-001 Exam Preparation & Leading Provider in Qualification Exams. Valid Exam Syllabus - Certified PHP Professional exam. Get CPP-001 dumps and be expert in PHP.

 
Sheebasaifi50     Založený: 08.07.2021   Príspevky: 15  
Príspevok Zaslal: 2022-01-21 14:20
Návrat hore  Odpovedať s citátom     

I loved all posts and content. Rajiv Chowk Escorts Service | Rajiv Chowk Escorts | Escorts in Rajiv Chowk |

 
seodon     Založený: 23.08.2023   Príspevky: 802  
Príspevok Zaslal: 2024-01-18 14:11
Návrat hore  Odpovedať s citátom     

So i am in fact content with see our site not to mention could have fun with perusing effective content pieces circulated in this case. Typically the creative ideas of this contributor was basically fantastic, thanks a lot for ones show. ufazeed

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-01-27 14:17
Návrat hore  Odpovedať s citátom     

This is often nice blog post and even i enjoy to enjoy a book it blog post. your site is without a doubt fabulous and you just contain decent office staff &#305;nside your web log. attractive writing continue the good work. pickleball paddles

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-01-28 13:45
Návrat hore  Odpovedať s citátom     

I just now idea it can be a notion to share incase anybody else seemed to be experiencing difficulty investigating although My business is a bit undecided plainly was allowed to fit bands in addition to deals with with in this article. 20 Fijnste activiteiten in Gent

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-01-30 11:37
Návrat hore  Odpovedať s citátom     

Maintain the fantastic perform, My partner and i examine handful of content with this internet site and also I do believe your net website will be genuine intriguing and contains received bags regarding great details. car lockouts

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-01-31 10:40
Návrat hore  Odpovedať s citátom     

Wonderful Content, Now i'm a massive believer for offer suggestions relating to internet websites to make sure you let the web page creators understandthat theyâ&#8364;&#8482;ve incorporated an issue good to make sure you just a couple of! trading platform

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-02-01 10:45
Návrat hore  Odpovedať s citátom     

It's amazing place together with i like to to read the paper the place. your blog is certainly superb also, you own superior workforce in your own webpage. fine posting keep it up. Consulenza SEO

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2024-02-04 11:03
Návrat hore  Odpovedať s citátom     

Your current tunes can be remarkable. You've got a number of quite accomplished musicians. My spouse and i would like anyone the top involving good results. SOLAR BACKUP SYSTEM INSTALLATION KENYA

 
Komal4k21     Založený: 31.01.2024   Príspevky: 904  
Príspevok Zaslal: 2024-02-04 12:02
Návrat hore  Odpovedať s citátom     

Unleash the full potential of your digital landscape with social media marketing company Pensacola . From meticulous keyword optimization to compelling content, we craft a winning formula for your website&#39;s success. Watch as your online presence transforms, attracting targeted traffic and boosting your brand&#39;s influence.

 
Komal4k21     Založený: 31.01.2024   Príspevky: 904  
Príspevok Zaslal: 2024-02-06 12:49
Návrat hore  Odpovedať s citátom     

Pensacola fishing charters unfold the pages of the Gulf&#39;s maritime novel, inviting anglers to write their chapters in liquid ink. Cast your lines into the narrative, where each fish becomes a plot twist in this underwater story. Pensacola fishing charters navigate the waters of storytelling, turning the Gulf into an angler&#39;s literary haven. Pensacola and Pensacola beach fishing charters

 
Komal4k21     Založený: 31.01.2024   Príspevky: 904  
Príspevok Zaslal: 2024-02-07 10:44
Návrat hore  Odpovedať s citátom     

Immerse your brand in a transformative digital experience with our unparalleled Website Design Ann Arbor expertise. We seamlessly integrate artistic creativity with functional precision, crafting a visually stunning and user-friendly website that serves as a captivating digital showcase for your brand, leaving a lasting imprint on your audience.

 
Odoslať novú tému   Odpovedať na tému   Choď na stránku 1, 2, 3, 4, 5, 6, 7  Ďalší  

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov