Developing a site in ProcessWire

Comments

  • Michael

    Michael 2 months ago 00

    Hi,

    is it possible to use the database object of PW for own database functions ? I need to write and read a lot of data into a database. how ?

    thanks a lot :-)

    • ryan

      ryan 2 months ago 00

      It is possible. Actually PW's $database API variable works exactly like PHP's PDO library. It doesn't specifically extend PDO, but it does duplicate all of its methods and delegates them to PDO. So any PHP documentation for PDO also applies to PW's $database API variable.

  • Rainer

    Rainer 6 months ago 33

    Is it possible to just include() my custom php functions and their output without creating a custom modul? How?

    • ryan

      ryan 6 months ago 33

      Absolutely. Just do exactly as you described, and include('your-file.php'); Anything you can do in regular PHP you can do in ProcessWire. You would use a custom module instead if you wanted your code to be more easily shared with others or installed and version maintained across multiple installations.

  • Stefan Wanzenried

    Stefan Wanzenried 2 years ago 44

    Hi Andy,

    Maybe a bit late but just in case:

    There's a nice module from ryan called "Pages Web Service".

    You can send queries via GET and get responses in JSON.

    http://modules.processwire.com/modules/service-pages/

  • Andy

    Andy 3 years ago 66

    Hello.

    Your content-centered approach seems perfect for multi-channel-publishing.

    the queryable API ist great — but how about accessing the content from say an app? Is there REST-access or something, which is also queryable in that way?

    Outside PHP, from different clients?

    Thanks for the info

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.