Created
June 10, 2017 16:28
-
-
Save jesgs/cf99818a67e758d7602a5b24c84f73ce to your computer and use it in GitHub Desktop.
Generate a PHP array from a sql query
This file contains 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
-- I'm lazy so this is what I did | |
SELECT CONCAT("['id' => ", id, ", 'some_column_string' => '", some_column, "'],") FROM mytable; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment