NYCPHP Meetup

NYPHP.org

[nycphp-talk] Returning DB results as XML or JSON?

Eddie Drapkin oorza2k5 at gmail.com
Thu Dec 3 16:54:25 EST 2009


Couch is largely the same way.  NoSQL or gtfo!

--Eddie

On Thu, Dec 3, 2009 at 4:47 PM, Mitch Pirtle <mitch.pirtle at gmail.com> wrote:
> Just wanted to add in there that you could use MongoDB instead of
> MySQL, which gives you additional opportunities to do stuff like real
> time analytics and live in a SQL-free world.
>
> Documents are stored in a binary JSON format, so there's no conversion
> needed. You could almost look at your PHP scripts as a simple REST
> interface to MongoDB, which would scale very gracefully and be very
> quick to prototype.
>
> -- Mitch
>
> On Thu, Dec 3, 2009 at 2:48 PM, Anthony Papillion <papillion at gmail.com> wrote:
>> Thank you Jake!
>>
>> On Thu, Dec 3, 2009 at 1:29 PM, Jake McGraw <jmcgraw1 at gmail.com> wrote:
>>>
>>> On Thu, Dec 3, 2009 at 2:19 PM, Gary Mort <garyamort at gmail.com> wrote:
>>> >
>>> >
>>> > On Thu, Dec 3, 2009 at 2:11 PM, Anthony Papillion <papillion at gmail.com>
>>> > wrote:
>>> >>
>>> >> While this seems (and indeed is) a rather simple task, it's also fairly
>>> >> tedious. Is there anything out there that can help me auto-format them
>>> >> in
>>> >> one of those formats? Something that takes a standard results set then
>>> >> transforms it into either XML or JSON?
>>>
>>> Here is how I would do it (using json_encode or simplexml):
>>>
>>> http://snipt.net/jakemcgraw/mysql-to-json-or-xml
>>>
>>> - jake
>>>
>>> >>
>>> >
>>> > json_encode
>>> >
>>> > http://www.php.net/manual/en/function.json-encode.php
>>> >
>>> > --
>>> > ----
>>> > Hudson Valley Sudbury School
>>> > What GPL is for application users
>>> > Our school is for students
>>> > Help your children grow, change, and learn
>>> > Let your child direct, control, amend
>>> > Check out http://www.sudburyschool.org
>>> >
>>> > _______________________________________________
>>> > New York PHP Users Group Community Talk Mailing List
>>> > http://lists.nyphp.org/mailman/listinfo/talk
>>> >
>>> > http://www.nyphp.org/Show-Participation
>>> >
>>> _______________________________________________
>>> New York PHP Users Group Community Talk Mailing List
>>> http://lists.nyphp.org/mailman/listinfo/talk
>>>
>>> http://www.nyphp.org/Show-Participation
>>
>>
>>
>> --
>> Anthony Papillion
>> OpenEMR HQ, Inc
>> (918) 533-9699
>>
>> _______________________________________________
>> New York PHP Users Group Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> http://www.nyphp.org/Show-Participation
>>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>



More information about the talk mailing list