Category : sum

I need to my php system to generate the total amount collected in general and the total amount collected in a month so i ve created a My Sql table below. CREATE TABLE `offering` ( date date NOT NULL, cash int(11) NOT NULL, ) and i have been able to achieve the total amount recorded ..

Read more

I have this table into a modal form: <div class="form-group"> <!– Record list –> <table id="tabscarichi" class="table table-bordered table-striped" style=’border-collapse: collapse;’ > <tr style=’background: whitesmoke;’> <th>Check</th> <th>Id</th> <th>Formulario</th> <th>EER</th> <th>Data FR</th> <th>Q.tà</th> </tr> <?php $query = "SELECT * FROM registro_c_s where stato_carico=’1’"; $result = mysqli_query($conn,$query); while($row = mysqli_fetch_array($result) ){ $id = $row[‘id’]; $fr = $row[‘formulario’]; ..

Read more

SELECT category_id,product_size,category_name,SUM(product_quantity) AS total_quantity FROM tbl_categories_quantity (table-1) INNER JOIN tbl_categories USING (category_id) GROUP BY category_id,product_size The Above Code is working in a single table, and I want to Add the below code (2nd table) that does not work SELECT category_id,product_size, SUM(product_sell) AS total_sell FROM tbl_product_sell (table-2) GROUP BY category_id,product_size THANKS Advance Sourc..

Read more

I checked several forums, tried by myself for some days,- can’t find a solution… I’m using this code which establishes a table: <?php $nextmonth = date(‘n’, strtotime(‘+1 month’)); $i=0; $q = $pdo->prepare(‘SELECT qi_domains.t,qi_domains.mo,qi_domains.j,qi_domains.domainname,qi_domains.auftrnr,qi_domains.tld,qi_domains.aktiv,ek_resrenew FROM qi_domains INNER JOIN qi_domainpreise_neu ON qi_domains.tld=qi_domainpreise_neu.endung WHERE qi_domains.mo=’. $nextmonth .’ AND qi_domains.kdnr=’.$kundencode.”); $q->execute([$_SESSION[‘id’]]); $res = $q->fetchAll(); foreach ($res as $row) { ..

Read more

I have code where I’m scraping data from other web site, but data is large and contains lot of numbers. I’m trying to find solution to sum all that numbers but still failing :/ That’s web scrapper I use: $url = file_get_contents(‘https://website.test/’); $webDoc = new DOMDocument(); libxml_use_internal_errors(TRUE); //disable libxml errors if(!empty($url)) { $webDoc->loadHTML($url); libxml_clear_errors(); $urlData ..

Read more

it returning the number of payments multiplied by the total rows of images in car_media with the same id . SELECT t.id, t.total_amount, t.updated_date, t.user_id, t.car_id , t.created_date, m.name as make_name, c.car_year, c.import_country, mo.model_name as model_name, c.chassi_nb , t.shipping_fees, p.transaction_id, IFNULL(SUM(p.amount),0) as total_payment, cm.img_path as img_path FROM car_transaction t inner JOIN car c ON t.car_id ..

Read more