Hello I’m getting the following error PDOException: SQLSTATE[22007]: 1292 Incorrect datetime value ‘2022-03-07T18:08:12.000000Z’ for column ‘created_timestamp’ at row 1 in /[path]/[to]/[project]/vendor/laravel/framework.src.Illuminate/Database/Connection.php:496 That looks like a…
Tag: mysql
php table update multiple records at one time
I have a table that retrieves the username and availability status from the users table. Right now in my testing database I have 3 records. If I try to change the availability field for any of them, noting in updated. This is my availability.php file (the first line keeps getting cut off): Here is my av_updat…
Invalid JSON path expression. The error is around character position
I insert json data to mySql database like this: Now, I try to update social-enable value using JSON_REPLACED method like this: In action I see this error: How do can I fix this problem? Answer JSON Path Syntax … Names of keys must be double-quoted strings or valid ECMAScript identifiers (see Identifier …
Random peaks in Mysql load slowing all users
We have a site that has been working pretty well for the past 2 years. But we are actually seeing random peaks in the database load that make the site very slow for a few seconds. These peaks only appear from a certain load on the server and are impossible to predict. More users = more peaks. Everything run v…
How to check if all mysql results are equal
I’m facing a difficulty at the moment – I’m working on a real-estate website where the seller has some developments which have individual units within each development (a house with 4 apartments, for example). The development has a status column in the database which specifies if it is Avail…
Two or more SQL queries in PHP function
Learning a graph-building PHP script I met a situation when PHP function performs only first query. Original code ALL OK, everything works, I have a pie graph with correct data. But when I add one more query to update data before further processing this case the function performs only first query adding +1 to…
My index.html PHP page will not load when my login code is present
I watched a tutorial to build out a registration / login page. The register.php page works fine and writes new users to my mysql database. The index.html page will not load at all for data entry as written (but doesn’t give me a specific error). I have checked it against the tutorial. I ran the code thr…
Display related posts from the same category. Using PHP and MySQL
I have a blog site in PHP and MySQL with tow table, POST and CATEGORIES. I need help, how to display related post from same category when visitor clicked on a single post title. your help will be greatly appreciated POST table POST_ID CAT_ID TITLE DESCRIPTION IMAGE 1 3 2 5 3 1 4 6 CATEGORIES table Cat_id Cat_…
What causes this query builder error in my Laravel 8 app? [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 6 m…
How to fetch values for every id present in array using loop
I have an array with following values: and a table ‘orderdetails’ in database with order_title and order_id columns. What I want is to fetch order_title of every order using order_id in a loop. Can anyone help? What I know is: but this will make query run multiple times, any better solution? UPDAT…