B
B
Bisekenov2017-11-17 13:11:19
PHP
Bisekenov, 2017-11-17 13:11:19

How to get data from database into php table and change it?

Hello! There is a database on
SQL SERVER 2008, the table stores "Name", "Date", "Sum"
For example:
ID NAZV
DAT
SUM
110
now I can’t display it in PHP like this:
12-12-2017 12-13-2017 12-14-2017
1. Math 100 120 110
5a0eb77533db6708960224.png
There is an idea to output using PIVOT (it would be nice not to use it), but then how to change it. For example, the user should double-click on "100" from the date "12-12-2017" and change it to his own, say, "105"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Koryukov, 2017-11-17
@MadridianFox

It's simple:
1) make a query select nazv, dat, [sum] from my_table where ...
2) in php, loop through the received rows, write individual values ​​to arrays and variables
3) output data from arrays and variables to the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question