I was looking at the Db class but the link is broken for the database reference on the page: https://getkirby.com/docs/guide/database, The connection and select etc are great but I would like to see what the format is for a ‘WHERE IN’ query (using and array of search terms) would be as I’m not familiar with this way of writing a query, please could someone point me in the right direction, thanks very much.
Which link is broken? The link you posted above works for me?
It’s on that page in the blue standout box just below the second paragraph.
Sorry, this is the link: https://getkirby.com/docs/reference/@#database
This should be the correct link: Database | Kirby CMS, fixed now.
BTW: You have access to all classes here: Objects | Kirby CMS
You can pass a SQL query to the query function, maybe that makes it easier if you are used to writing standard SQL queries. Or you resort to PDO, you don’t have to use Kirby’s database or Db classes.
Note that Database::connect() returns a PDO object, so you can take it from there if you prefer.
Thanks Texnixe, that’s excellent, your help is always most appreciated!