I have a csv file, that has different payment types in, it is from an EPOS system. Somethimes it doesn't include all the different payment types listed below. It looks like this
Payment type,Payment transactions,Payments amount
Card Payment,6,110.3
Cash,5,59.1
Online Order,2,59.4
Voucher,1,19.5
I am attempting to get the 'Payments amount' into a MYSQL DB via PHP, into a single row with columns which are the 'Payment type' like this
| transaction_id | Card Payment | Cash | Online Order | Voucher |
-----------------------------------------------------------------
| 12-12-19 | 110.30 |59.10 | 59.40 | 19.50 |
-----------------------------------------------------------------
I have got the data into the DB by following the tutorial here but I am having a problem getting the data onto a single line. Could someone point me in the right direction please.