Jump to content

How wrote PW data in the database


coderenaline
 Share

Recommended Posts

I dont be an pro coder, but understand all what i want to know so far.

Now i try to understand the code from processwire. Espacially how PW does get and set data in the database.

I look Database....php, WireData.php and so on and many set() and get()-methods therein. And i know of the existence from $db.

But i dont understand or see which method(s) in which class(es) used for SQL-Statements - especially in the case of fields.

So i look the code from the example "event" from ryan. I see set() and get()-methods in event.php.

Can anyone help me and hands on me further?

Which methods and classes set and get data from the database?

How can i manipulate the sort-order?

Thank in advance.

I know how i can wrote and read in the DB with the $db, but i would like understand the processwire-way.

Link to comment
Share on other sites

The processwire way is in 95% to use the API, and not to write directly to the DB. (Using direct access is for rare edge cases or maybe sometimes when create a module)

PS: Ah, it is your first post here. Welcome! :)

Edited by horst
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...