i am executing SQL statement like this with PDO. and $_POSTData_array is like this the problem is i can’t get the null as null in db, its update as blank. any help??? UPDATE ! as per comment by Álvaro González i tried var_dump(). var_dump() is much better. I need to insist: how do you know that you’re getting NULL values
How to modify result of select statement based on values?
I am not MySQL guy just learning by doing things, I have database that stores value 0 or 1, now in grafana I want to display online if value yield from select statement is 1 and offline if value of online in select statement is 0. So far this is what I wrote But select statement through error. Answer You’re
Query JSON array using MySQL
I’m trying to get the data within the Rule column. It has a value in JSON format. I’m trying to construct the query to get the part which says “value”:8. Column name: Rule. JSON within …
How to have exact decimal values without rounding in MySQL
I have this SQL script below: What I expect like result is: 72.39. I don’t want to round the number. if I use the select round(72.396, 2) the result I get is: 72,40 How can I have what I expect without rounding using Mysql? Answer You need to use the truncate function instead of round: To answer the question in
MySQL 5: How to find the peak of customers during working time
I have table in MySQL with times spent by customers and I need to find the most busy 30 mins. Expected result is something like multiplerows with time and number of customers: I can easily make 5 sql queries and get the result (I made some view in similar problem https://stackoverflow.com/a/59478411/11078894 ), but I do not know how to get
SQL: status flips between 1 and 2; select all statuses, which are 2 since the last time it was 1
I have write only DB log of changes I keep track of (or statuses) and values fluctuate between 1 and 2. In the below table; ID is identity column, STATUS is either 1 or 2 and USER is a user id. If …
Why do I need to quote the table name `5e09c9c09e9ba0cceccb3701` in MySQL?
Context I encounter a bug in our application related to MySQL table names. Our application generates table names as a 24 hexadecimal digits number (i.e.: 5e09c9c09e9ba0cceccb3701). Everything went …
Managing multiple categories trees, using Python and PostgreSQL
I have multiple categories, which can have None or one or multiple sub-categories. The process theoretically can go to infinite. So, it is like having multiple trees. Tree example. I have also Item(s). An Item can be in multiple categories. At this moment to connect the categories, in database I use three fields: children (the children of a category), path([1,4,8],
SQL query to find largest id for each user_id
I am currently querying from 4 different tables, users, memberships_users, membership_levels, phone_area_code From the users table, I would like to select id user_login, user_email, display_name …
Use SQL Field in SSIS Variable
Is it possible to reference a SQL field in your SSIS variable? For instance, I would like use the field from the “table” below Select ‘999999’ AS Physician_Profile_ID as a dynamic variable (named “…