Category "mysql"

MS Access ODBC Connection error - "cannot define field more than once"

Does anybody have some insight on why the following error "cannot define field more than once" comes up in ms access when connecting MySQL tables via ODBC? The

How to use Python-Operator % for multiple values?

I'm trying to fill an SQL database with soma data, measured by an bme680. Therefore I'd like to format the measured values like this: print ("Temperatur: %0.1f

how to get weeklytotal and yesterday record in mysql in one table

Hi Everyone i am trying to implement query to get weekly and yesterday data in same table, dummy output i have shared below, if yesterday not exist as per emplo

Resolving 'Illegal-mix-of-collations' MYSQL error in node

I am connecting to a mysql database from node using mysql2 and have been experiencing intermittent illegal-mix-of-collations errors - see this question. The col

How to use multiple databases in Django with an empty 'default'?

I'm trying to make a multiple database project in Django. But I'm having problems to properly migrate my models to the appropriate database. I'm using the 'Writ

Can I replace MariaDB with MySQL in Bitnami MAMP?

I am maintaining an old, large CakePHP project which relies on the JSON database column type. This type is supported by MySQL but not by MariaDB. Changing out t

Do MySQL databases implement Transactions by Default?

I was wondering what happens when several users try to UPDATE a MySQL database at the same time. Went online and learnt about Transactions. Do I need to define

mysql table formatting and infile issue

Each time I go and create my table and then add the .csv file, it keeps not fully loading in all of the data. Below is my code: CREATE TABLE Parts_Maintenance (

Join to another table only matching specific records

I have a table of ports: drop table if exists ports; create table ports(id int, name char(20)); insert into ports (id, name ) values (1, 'Port hedland'),

Index Usage in MySql InnoDb

I wonder that the index usage in Mysql InnoDb Engine. below is simplified example. fields a , b , c , d indexes a(pk) (a, b, d) (composite index) Query Select

Can't create an mysqlpump equivalent to mysqldump --all-databases

I want to create logical backups of my mysql instance. The instance contains a couple of databases and a few users. I want to backup all of them without explici

MySQL JSON: How to find object from key value

I'm trying to find a way to search a JSON object and get a particular key but search on another key. Here is an example schema: CREATE TABLE `fields` ( `id`

How sum certain duplicated data?

I have a list of ids, some ids can be duplicated. How to sum values for the same id in one query? SELECT SUM(`power`) FROM `stats` WHERE `template` IN (489191,

Mysql.innodb_table_stats & mysql.innodb_index_stats not updating

I believe I have persitent stats configured correctly and there are records in INFORMATION_SCHEMA.STATISTICS table but the following tables ha

PHP inserts weird symbols instead of polish letters [duplicate]

When i'm inserting data from mysql database using this code it doesn't fill polish letters instead it shows random weird symbols instead of po

**TypeError: 'NoneType' object is not iterable**

I wanted to use an ssh tunnel to access a Mysql database. Unfortunately the architecture of this code doesn't seem to support the format of my query, as the fun

Slow count query with group

I have a common aggregation query: SELECT products.type, count(products.id) FROM products INNER JOIN product_colors

How to select record in the database using BETWEEN in sql?

How to select record in the database using BETWEEN in sql? what I want here is to select record within the startDate and endDate. if the record is exists within

Filter my select options by department and location

I have a problem in my website, I have 2 dropdown selects that are Departments and Locations, my problem is when I select a certain department and start typing

Is there MySQL syntax for joining more than three tables when inserting?

Here is my query: INSERT INTO film_new (SELECT title, rental_rate,length,film_id,length,release_year FROM film) JOIN film_actor ON film.film_id = film_actor