Efelico's Posts
Nairaland Forum › Efelico's Profile › Efelico's Posts
$temp_result=array(); $array=Array("[A.txt]" => 72,"[B.txt]" => 27,"[C.txt]" => 12); $firstKey = array_key_first($array); $sum=array_sum($array); $temp_result=array_merge($temp_result,array($firstKey => $sum)); $output = array_slice($array, 1); $secondKey = array_key_first($output); $sum=array_sum($output); $temp_result=array_merge($temp_result,array($secondKey => $sum)); $output = array_slice($array, 2); $thirdKey = array_key_first($output); $sum=array_sum($output); $temp_result=array_merge($temp_result,array($thirdKey => $sum)); print_r($temp_result); |
Your location |
StPete:While I agree 35 is late. It's better you train your children on how to start making money on their own early in life. Every environment has marketable skills both online and offline they can under in less than 8yrs and they are good to go. My closest friend started wiring at age 18, that guy lives independently of whether his parent provide for him or not. Currently one of my students in J.s.s 3 makes Atleast 5k from graphic design every month. Everything na training plus say God bless our hustle |
dingbang:That one na before. The way I see things being done is to train your children to be financially independent before their mid twenties atmost I've seen a number of both secondary and uni students pay their fees not because their parents are broke but because they can afford it. All na training. If you teach your children how to make money last last both parent and child go feel the heat in d future but this has little or nothing to do with age |
Guy both are very lucrative but just be good in your field. Try learn modern design and don't get stuck with the old ways of doing things |
qtguru:Boss. I'm in for the meeting. What time/ platform |
I have latitude e6420 core i5 with 8g ram. The laptop freezes once in a way. And once it freezes the keyboard and mouse stop working until I force restart it. Have tried monitoring under what condition it does freezes but I discovered the system does not have any specific condition under which it hangs. Please any suggestion or solution |
almarthins:No now. In as much as u dey healthy, old man face no mean early grave. At times even people with health related issues live longer than expected if managed well not to think of person wey dey healthy but looks older than him age |
goldmines214:Have replied your mail |
goldmines214:Send me a pm |
goldmines214:Check this link https://stackoverflow.com/questions/1241178/mysql-rows-to-columns The concept is the same. You can either do the transposition using your query or php code. I guess using query will be more easier for you |
goldmines214:check how to transpose row into column using MySQL on stack overflow. |
qtguru:Boss. Please I want to get in touch with you. Have tried sending u a PM before. I need ur guidance on some programming related issues |
I need the service of a programmer to integrate PayPal on a website. The website is design in vanilla php. WhatsApp 08161294451 |
Halfamilli:I appreciate your time |
I have read and heard both positive and negative health perspective of using charcoal or charcoal and salt for teeth whitening without knowing which part of the divide to follow that is why I am simply asking "does charcoal and salt whiten the teeth?" |
Facebook and Andela have partnered to up-skill developers across all countries in Africa through a seven weeks immersive program where selected developers will work as full-stack developers or in agile remote teams to innovate industry led projects or SDGs. visit https://buildforsdg.andela.com for more detail. Application closes by: August 7 2020 |
devdev:Thank you for your time |
devdev:Thanks alot |
aronski:Thank you. I do appreciate |
Being relative new to mobile app development. Please, I will like experts to share their view on which is better to go with between using firebase or connecting to mysql as the database for either small or large scale mobile project in the below aspects (1) if the app does not connect to an existing database or third party platform to share the same data (2) if there is a database for the app already ( assuming I am connecting the app to a web site to sharing the same data:something like how Facebook app). Thank you |
zerateck:I have a working code on a simple left joint just that it requires merging and looping over arrays but case statement simply does everything from the database level |
zerateck:I really appreciate your time. That is not my main table(The score table is my main design). I am transposing the score table (The main table) to achieve that purpose. I am trying to generate a school broad sheet from the score table. I just want to try this approach as it does not need much processing from the application layer and to learn another way of achieving tasks related to something like this. I really appreciate cause I never consider the number of columns however the page will be rarely visited once the broadsheet is download. I will check your post as you did mentioned. I really appreciate thank you Sir |
and this is the expected outcome. this is what i want to produce. Thank you
|
this is the scores table in it un-transpose state
|
This is the subject table
|
i have a score table similiar to this regid---------------test1----------------------exam-----------------subject 3m----------------5----------------------------8---------------------12 4m--------------8-------------------------------14------------------13 3m----------------9-----------------------------24------------------13 and a score table similar to this id------------------subject_name 12-------------------maths 13------------------english I want to transpose the row and column using dynamic pivot table in mysql. i can transpose to get something like regid________maths______________________english 3m----------- 5---------------------------9 4m-----------null------------------------8 it simply means i can transpose to get only column for test but i want column for exam in the transpose table so that the result will be like regid________maths.test______________________maths.exam____________english.test_________________english.exam 3m----------- 5---------------------------------------8----------------------9-----------------------------24 4m-----------null-----------------------------------null-------------------------8--------------------------14 I have tried SO no answer yet. I have tried writing something like SELECT GROUP_CONCAT(DISTINCT CONCAT( 'SUM(case when subject = ''', subject, ''' then test end)AS `', (select subject_name from subject where id=subject), '`', 'SUM(case when subject = ''', subject, ''' then exam end)AS `', (select subject_name from subject where id=subject), '`' ) ) INTO @sql FROM scores; SET @sql = CONCAT('SELECT reg_id, ', @sql, ' FROM scores where term="First term" GROUP BY reg_id'); PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; Thanks for any assistance |
Done |
looking for web developer role(php) |
the andriod link is broken |