Generate these Results in PHP Mysql

Asked

Viewed 72 times

2

I wonder how this kind of result is generated... How it is formatted this way.

Mes/Ano | Vencidos | A Vencer | Vencendo
01/2015 |    5     |    0     |     0
02/2015 |    1     |    0     |     0
04/2015 |    15    |    0     |     0
06/2015 |    7     |    0     |     0
07/2015 |    1     |   200    |     3
09/2015 |    0     |   578    |     0
12/2015 |    0     |   231    |     0

Is some specific program that does this?

  • what does what? format the output Month/Year ? ordering? do not understand.

  • Like, you have an SQL and run it, and it comes with this kind of results... I’ve seen it in several questions but I have no idea how it generated this result... manually it was not

  • 1

    As well, you mean the table formatting as text?

  • André, can you give an example of "I’ve seen it in several questions"? and explain the question better? I can’t figure out what you’re looking for...

  • It is well the answer that was posted, only I do not know how to access mysql in cmd..

1 answer

4


Access the path where mysql is installed, in my case I am using xamp but a default installation is usually in the folder "C: Program Files Mysql Mysql Server x.x bin"

C:\>cd xampp/

C:\xampp>cd mysql

C:\xampp\mysql>cd bin

C:\xampp\mysql\bin>mysql -u root -p

The -u root command indicates the -p user indicates that it will request password

Then right click, select all, Ctrl+C and Ctrl+V here on the site:

    mysql> select usu_id, usu_nome, cancelado from tab_usuario limit 10;
+--------+----------+-----------+
| usu_id | usu_nome | cancelado |
+--------+----------+-----------+
|      1 | maison   | NULL      |
|      2 | marcio   | NULL      |
|      3 | marcos   | NULL      |
|      5 | celso    | NULL      |
|      6 | denise   | NULL      |
|      7 | camila   | NULL      |
|      8 | kelen    | NULL      |
|      9 | ingrid   | NULL      |
|     10 | eliziane | NULL      |
|     11 | felippe  | 1         |
+--------+----------+-----------+
10 rows in set (0.00 sec)

Obs: in the case of Easyphp which was the case of the author of the question then the path to get to the folder where mysql is installed:

C: Program Files (x86) Easyphp-Devserver-14.1VC11 binaries mysql bin

Browser other questions tagged

You are not signed in. Login or sign up in order to post.