Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modify the return value of an query from mysql database

Status
Not open for further replies.

bazziewazzie

Programmer
Feb 22, 2005
1
NL
Hello

I'm very new to unix scripting. But this time I need to have an unix script for my X-code application for Mac OS X. I want to connect to a MySQL database wit my application. The problem is that the results of an Query is like this
+------------+--------+
| column 1 | column 2 |
+------------+--------+
| result 1 | result 3 |
| result 2 | result 4 |
+------------+--------+

I'd like to convert this to something like
{{result 1, result 3}, {result 2, result 4}}

Does anyone know how to do this?

greetings bastiaan
 
man awk

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top