Find Jobs
Hire Freelancers

mysql parent child loop and sum total

$10-30 USD

Selesai
Disiarkan 10 bulan yang lalu

$10-30 USD

Dibayar semasa penghantaran
i have database my script below function get_Qty_Ranking($user_id, $date_start, $date_end){ $total_unit_active_query = $conn->query("select * from parent_amount where fund_unit_account = '".$user_id."'"); $UnitTotalQty_active = 0; $USDTTotal_active = 0; if ($total_unit_active_query->num_rows > 0) { while($total_unit_active = $total_unit_active_query->fetch_assoc()) { $UnitTotalQty_active += $total_unit_active['fund_unit_qty']; $USDTTotal_active += $total_unit_active['fund_unit_usdt']; } }else{ $UnitTotalQty_active = 0; $USDTTotal_active = 0; } if($UnitTotalQty_active < 10){ $comm_2_rate = 0.015; $package_title = 'SILVER'; }elseif($UnitTotalQty_active > 9 && $UnitTotalQty_active < 30){ $comm_2_rate = 0.02; $package_title = 'GOLD'; }elseif($UnitTotalQty_active > 29){ $comm_2_rate = 0.025; $package_title = 'DIAMOND'; } $ranking_total = $UnitTotalQty_active; if($ranking_total <= 9){ $ranking_total_title = 'SILVER'; }elseif($ranking_total >= 10 && $ranking_total <= 29){ $ranking_total_title = 'GOLD'; }elseif($ranking_total >= 30){ $ranking_total_title = 'DIAMOND'; } if($ranking_total <= 9){ $ranking_final_rate = 0.015; }elseif($ranking_total >= 10 && $ranking_total <= 29){ $ranking_final_rate = 0.02; }elseif($ranking_total >= 30){ $ranking_final_rate = 0.025; } return array( $ranking_total, $ranking_total_title, $package_title, $comm_2_rate, $UnitTotalQty_active, $USDTTotal_active, $ranking_final_rate); } $ranking_final_rate = 0.025; function getChildren($parent, $r_rate, $am) { $query = "SELECT * FROM customers WHERE customers_agent = $parent and customers_position < 6"; $result = $conn->query($query); $children = array(); if ($result->num_rows > 0) { $i = 1; $tt_over_amount = 0; while($row = $result->fetch_assoc()) { list(${'a'.$i}, ${'b'.$i}, ${'c'.$i}, ${'d'.$i}, ${'e'.$i}, ${'f'.$i}, ${'g'.$i}) = get_Qty_Ranking($row['customers_id'],date('Y-m-d'), date('Y-m-d')); if(${'g'.$i} < $r_rate){ $over_amount = ($r_rate - ${'g'.$i}) * ${'a'.$i}; $tt_over_amount += $over_amount; $tt_am = $tt_over_amount + $am; $children[$i] = array(); $children[$i]['name'] = $row['customers_username']; $children[$i]['id'] = $row['customers_id']; $children[$i]['position'] = $row['customers_position']; $children[$i]['r_rate'] = ${'g'.$i}; $children[$i]['qty'] = ${'a'.$i}; $children[$i]['over_amount'] = $over_amount; $children[$i]['tt_over_amount'] = $tt_am; $children[$i]['i'] = $i; $children[$i]['children'] = getChildren($row['customers_id'], $r_rate, $tt_am); $i++; } } } return $children; } $finalResult = getChildren('15', $ranking_final_rate, 0); function printList($array =NULL) { if (count($array)) { echo "<ul>"; foreach ($array as $item) { echo "<li>"; echo $item['i'].') '.$item['name'].' - '.$item['id'].' (ID) - <strong><span style="color:#ff0000;">'.$item['over_amount'].'</strong> (amount)</span><br /><strong>'.$item['tt_over_amount'].'</strong> (total amount)'; if (count($item['children'])) { printList($item['children']); } echo "</li>"; } echo "</ul>"; } } printList($finalResult); i need the sum total 0.385 i need sum total all number in red color
ID Projek: 36943503

Tentang projek

34 cadangan
Projek jarak jauh
Aktif 10 bulan yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
Dianugerahkan kepada:
Avatar Pengguna
Hi there, I checked and viewed your project description. I've 5+ years of experience in web development and as this task is in scope for me, I'm interested in submitting my job proposal. Kind Regards Rahul Kumawat
$30 USD dalam 1 hari
5.0 (6 ulasan)
3.3
3.3
34 pekerja bebas membida secara purata $27 USD untuk pekerjaan ini
Avatar Pengguna
Hi I have read all code and seen attached images, confident to handle the job really well and immediate available to get started I assure you won't regret working with me on this :)
$70 USD dalam 1 hari
5.0 (135 ulasan)
7.6
7.6
Avatar Pengguna
Hi, I am Joomla,PHP programmer having 8 years of experience. I am very good in wordpress,php,mysql,joomla. I have done highest projects here in Joomla.
$60 USD dalam 1 hari
4.8 (546 ulasan)
7.4
7.4
Avatar Pengguna
Hi there, I have read your all requirements mysql parent child loop and sum total I have 10+ years of experience in designing and developing websites in WordPress, eCommerce, WooCommerce, Shopify, Laravel, PHP, PHP core, API integration, MySQL, HTML5, CSS3, Shopify, Graphic design, Magento, JavaScript, and JQuery. We have worked on many projects across various industries such as WordPress, e-commerce, and graphic design specifically with WordPress and other frameworks such as Laravel and Codeigniter. This makes us well-suited to tackle this project. Let's have a quick conversation, so we can discuss everything in detail. Thanks Regards J.
$20 USD dalam 2 hari
4.8 (273 ulasan)
6.9
6.9
Avatar Pengguna
Greeting, I have read your description I'm interested in your project. I can start working immediately so we can clear up all the flow for you to get started as soon as possible. Thanks
$50 USD dalam 1 hari
4.8 (70 ulasan)
7.2
7.2
Avatar Pengguna
I understand that you are looking for someone to help you create a mysql parent child loop and sum total, and I believe I am the perfect person for the job. With 18+ years of experience in web development, I have the expertise needed to complete this project. My team consists of experienced mobile app developers who possess 8+ years of experience so you can rest assured that any project we take on will be of the highest quality with support provided after completion. We also offer competitive rates & a commitment to providing excellent service. If you'd like to discuss this project further please don't hesitate to reach out to me directly!
$60 USD dalam 1 hari
4.9 (237 ulasan)
6.7
6.7
Avatar Pengguna
Hello Sir, I can do this job as listed and deliver this in next 24 hours at max. I am ready to start right away. Please check my profile for work and experience. Regards Jahangir Khan
$30 USD dalam 1 hari
4.9 (90 ulasan)
6.2
6.2
Avatar Pengguna
Hi there, Please provide an opportunity to have a real-time conversation with you here. I can start your project immediately and look forward to working with you. I BELIEVE "ON TIME IS A WONDERFUL THING" With a Positive Hope! Warm Regards, Arvind Vashisat
$30 USD dalam 1 hari
4.8 (81 ulasan)
6.0
6.0
Avatar Pengguna
Hi there.. I'm a personal freelancer and interested help you to resolve your task assignment problem in recursive calculation and get result as your expected like on the attachment (red color).. and now I'm ready and available.. so I can do it soon.. I was able to work on this project.. because I have quite a long experience (15+ years) with full stack web development with PHP, Bootstrap, ReactJs - Redux Js, jQuery, API, and also Database Architecture using MySQL, MSSQL, and PostgreSQL. Looking forward to discussing and collaborating with you! Thank you Vincent
$30 USD dalam 1 hari
4.7 (37 ulasan)
5.2
5.2
Avatar Pengguna
Hello, Hope doing well... I have just examined your descriptions regarding the mysql parent child loop and sum total So here is the group of professionals with 6years+ of experience in PHP, WordPress, Woocommerce, Cake PHP, Codeigniter, Web Designing, Laravel, HTML, CSS, Javascript, jQuery, and My Square. As visible your abilities requirement we're the quality for this task. will make you one hundred% satisfied with my work. I am ready to start work right away on your project ship me more information about it within the chat. looking ahead to your reaction. regards, Atif ~ D
$10 USD dalam 1 hari
4.8 (41 ulasan)
4.8
4.8
Avatar Pengguna
I understand that you are looking for a freelancer to help you with your project of obtaining the sum total of all the numbers in red color. My skillset includes php, laravel, cakephp, ci and yii. I have extensive experience in website development and specifically in content management systems such as WordPress and Woo Commerce which will be a great asset for you in solving this problem. With my knowledge of these systems I can ensure that your website is up-to-date with the latest technologies so that it can be used across all major browsers and devices without any issues. Additionally I offer 24x7 client support so that you do not have to wait for long to get any issues resolved. I would be delighted to help you with this project and I believe that my need-based bespoke design and development along with my dedication to getting it done within 24 hours max would be the perfect fit for this job. Please feel free to contact me if you would like more information or if you would like me to start working on this right away!
$20 USD dalam 7 hari
5.0 (15 ulasan)
4.7
4.7
Avatar Pengguna
Hi, so do you need a query executed in PHP that return 0,385? 1. I don't understand how the sum can be 0,385. the sum of what?? I hope we will discuss about it, Gabriele
$30 USD dalam 1 hari
4.9 (12 ulasan)
4.5
4.5
Avatar Pengguna
Hi there, I am an excellent PHP/MySQL developer and have much experience with this field. I can start to work right now and complete it within 2hrs. Sincerely regards. Oleg
$10 USD dalam 1 hari
5.0 (8 ulasan)
4.2
4.2
Avatar Pengguna
I have more than 10 years of experience working with PHP, CodeIgniter, Prestashop, Laravel, MySQL, PostgreSQL, API, HTML, Javascript, Node Js, Vue Js Css, Git, C#, TLV, QR Code, BarCode, SQL Server, Devexpress, and integrating online payment gateways, Paypal, Payer, PerfectMoney, Coinbase. I can start work right now
$20 USD dalam 1 hari
5.0 (13 ulasan)
4.1
4.1
Avatar Pengguna
Hi Low, Hope you are fine. We have the experience and skills required to complete this project and provide the necessary solution. Our team consists of experienced professionals with extensive knowledge in PHP, databases and software development. Our aim is to provide you an innovative and creative solutions to meet your needs. So, please share your specific requirements and credentials, so that we can start working on it. We have 8+ years’ experience in .NET, PHP, C#, JavaScript, Node.js, React.js, Angular.js, Laravel, IOS, Androids, MY SQL, Code Igniter, web design, HTML and CSS. Portfolio will be provided if you require. We would be delighted to discuss this project further with you. Waiting for your response. Thankyou!
$30 USD dalam 1 hari
5.0 (10 ulasan)
3.7
3.7
Avatar Pengguna
Hello there, I hope you are doing well. I am an experienced database administrator using SQL for more than 10 years. I have read your project description and I am very interested in your project. I can help you to check and update your MySQL query to return the expected output as your requirement. I can start right now and will provide you the top quality work for sure. Please contact me to discuss more about the detail. Regards,
$50 USD dalam 2 hari
4.9 (22 ulasan)
3.9
3.9
Avatar Pengguna
Hi, Hope you are doing well. I checked your description "mysql parent child loop and sum total". I'm a senior developer with 9 years of experience in PHP and MySQL. I want to discuss with you for the project. Thanks & Regards
$20 USD dalam 1 hari
5.0 (3 ulasan)
3.5
3.5
Avatar Pengguna
I read your brief and understand your requirements and can provide you sum total of all numbers in red color and I believe that I have a strong grip on PHP, and MySQL and can do all this in a specific timeframe Come to the chat box so we can start right now
$15 USD dalam 1 hari
4.1 (13 ulasan)
4.1
4.1
Avatar Pengguna
I understand that you are looking for someone to help you Sum Total 0.385 for your MySQL parent child loop and sum total. My name is Atif and I am a Full-Stack Developer experienced enough to handle any kind of project. Additionally, I have many satisfied clients who have chosen me for their website development needs. I believe that I am the best fit for this project due to my expertise in MySQL and PHP which will be required for this project as well as my commitment to delivering quality work on schedule. With my skillset, experience and commitment, I am confident that I can deliver the sum total you are looking for within the timeline specified. Please feel free to reach out if you have any further questions or would like me to provide any additional information about myself or my services.
$10 USD dalam 3 hari
5.0 (4 ulasan)
2.8
2.8
Avatar Pengguna
Hi, Low N. I've gone through the job posting. It seems that you're looking for a programmer who have rich experiences on MySQL and PHP. I am checking your attachment, I'll update you shortly... I've worked with another client in this space, I think you might find it very interesting to have chat. Regards, Lyuba
$20 USD dalam 1 hari
5.0 (1 ulasan)
2.2
2.2
Avatar Pengguna
Hi, I am a professional web developer and I can do this job for you. I have 5 years of experience in web development. I have done many projects like this. I can do this job for you. I can start right now. Please contact me. Thanks
$15 USD dalam 3 hari
1.2 (5 ulasan)
3.2
3.2

Tentang klien

Bendera MALAYSIA
Puchong, Malaysia
5.0
6
Ahli sejak Okt 18, 2012

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.