jdorn / sql-formatter

A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.
http://jdorn.github.com/sql-formatter/
MIT License
3.89k stars 187 forks source link

Query mysql record and convert to array using php #69

Closed malmalakh closed 9 years ago

malmalakh commented 9 years ago

Hello ... I was searching for a solution for my problem and I hope I could find it here.

I am looking for a help in getting a certain record from MySQL table and then convert it to an array. I have two MySQL tables:

Table(1)name: sent_msg ... with the following columns: serial tonum fromch

Table(2)name: channel ... with the following columns: serial phone

the fromch at table(1) matches serial at table(2). The record I want to get is tonum.

Please advice.

Regards.