N
N
Niko True2013-11-14 14:59:04
MySQL
Niko True, 2013-11-14 14:59:04

sql query result output without fields

When executing a normal SELECT, I get a small table with the field name and content on the output. Can this be bypassed somehow? For example, what would the output be like the output from sqlite?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Niko True, 2013-11-14
@buloshnik

I solved my problem like this (the piece used in the script):


mysql -pPASSWORD --skip-column-names --exec="\
        SELECT userid FROM proftpd.users WHERE userid='$name';" | cat -

H
htaccess, 2013-11-14
@htaccess

There is a line by line output

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2013-11-14 16:22:29 |
+---------------------+
1 row in set (0.00 sec)

mysql> select now() \G
*************************** 1. row ***************************
now(): 2013-11-14 16:22:32
1 row in set (0.00 sec)

mysql> 

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question