15 posts in this topic
Recently Browsing 0 members
No registered users viewing this page.
i am newbie, so i'm sorry for silly question..
i want to insert data to my database.
this is my syntax
$pDOStatement = $database->query("INSERT INTO questions (ID_USER,TIME_Q, QUESTION) VALUES (1,NOW(), $pertanyaan)"); for $pertanyaan is my variable which string.
but, i get error (in attacment)
please help. thx
Today I have been running in mysql errors using @renobird s Module MarkupActivityLog which still uses mysqli Driver.
Although mysqli is still supported PDO driver is the default database driver in PW since https://processwire.com/about/news/introducing-processwire-2.4/
and its strongly recommend to all module authors to use/change-to PDO driver instead of mysqli.
@renobird I have sent a pull request.
A list of other affected modules not updated until now.
(I try to keep them up to date. Please help)
@apeisa ProcessTrashman, ProcessRedirects
With any website, there is the possibility of db issues - overloaded server, network connectivity if the db is on another machine in the hosting network, etc.
I would love to see a feature where if there is any reason the db fails or cannot be accessed, then pw displays a dedicated page that is stored in the filesystem - instead of displaying nothing, or an ugly mysql error. Obviously it would be good to log the error, and possibly send a notification to the admin (email?).
This gives us the opportunity to still present a professional front (albeit with no functionality) while problems are resolved behind the scenes. I cannot think of a company I have worked for that hasn't had db errors at times
What are your thoughts?