crocodilu2008 Posted September 4, 2008 Share Posted September 4, 2008 Hi I found this fragment SQL herehttp://www.navioo.com/javascript/MySQL_to_JSON_1361.html and i need help whith the php code (example please) for sending out in a javascript file the output. Thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted September 4, 2008 Share Posted September 4, 2008 There are also mysql UDFs for JSON. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 4, 2008 Share Posted September 4, 2008 Why not use php json_encode() ? Quote Link to comment Share on other sites More sharing options...
crocodilu2008 Posted September 4, 2008 Author Share Posted September 4, 2008 There are also mysql UDFs for JSON. Do you now mysql UDFs for JSON is faster than : SELECT CONCAT("[", GROUP_CONCAT( CONCAT("{username:'",username,"'"), CONCAT(",email:'",email),"'}") ) ,"]") AS json FROM users; ? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 4, 2008 Share Posted September 4, 2008 They should be much faster, since they're pre-compiled, but I haven't benchmarked this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.