mevdschee / mevdschee/php-crud-api
Access to db in handler
Open
@mevdschee is already working on this.
Since Oct 4, 2022.
enhancement
- Dominant language
- PHP
- Stars
- 3.7k
- Forks
- 1k
- Avg merge
- 1h 55m
- Merged PRs (30d)
- 7
Description
Hi, I'm not really a PHP guru.
I would like to check if a field called "oid" is currently null while updating. If the actual value in the DB is null, an update should be possible, otherwise no update should be made.
I think the validation handler would be the right place for this. My problem is how to access the database from the handler?
Can I reuse any function without opening a complete new connection to the db?
Or should I put it in another place? If so where?
Hope you can help me.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.