Created
April 15, 2016 20:37
-
-
Save ZeroByter/be33b2c4bc5bcab78b1c1aa6a9d1f0b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_all_channels_by_order(){ | |
| var channels = [] | |
| function process(err, result){ | |
| channels = result | |
| } | |
| mysql_connection.connect() | |
| var result2 = mysql_connection.query("SELECT * FROM channels ORDER BY listorder ASC", function(err, result){process(err, result)}) | |
| mysql_connection.end() | |
| console.log(channels) //this still returns an empty array :( | |
| return channels | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment