Questions tagged [mariasql]

A node.js binding to MariaDB's non-blocking (MySQL-compatible) client library

mariasql is a node.js binding to the non-blocking client library provided with MariaDB. It is compatible with MySQL.

This binding is different from other libmysqlclient bindings in that it uses the non-blocking functions available in MariaDB's client library.

Install it with the npm package installer:

npm install mariasql

The source code is located at github:node-mariasql.

References

143 questions
0
votes
0 answers

Load data into Mariadb with files containing (((

I'm completely new to import CSV into MariaDB I have a CSV with the following columns that I am trying to import into a new…
mikeldub
  • 1
  • 1
0
votes
3 answers

MySQL Select when not exist return 1

I have a problem in the MySQL Query: How can i SELECT something but when it errors because it doesn´t exist it should return a value like 1 or something else. My Query SELECT License FROM fivem_auth WHERE IP = '34.45.34.77';
Tuncion
  • 51
  • 6
0
votes
1 answer

Conversion of bigint unsigned column to bigint signed fails

I get a syntax error in a MySql database version 7.0 SELECT r.id, r.number, r.numbertype, r.forhandler, LAG(r.number) OVER (PARTITION BY r.numbertype ORDER BY r.number) AS last_row_number, LEAD(r.number) OVER (PARTITION BY…
0
votes
0 answers

MariaDB with Docker trying to load in an SQL file

I'm currently trying to get some dummydata for my project. So I setup a docker file and I am trying to load in some data from a csv file. I'm not getting any error's just an empty database. Docker: version: "3.3" services: maria-db: image:…
Jens Panis
  • 99
  • 8
0
votes
0 answers

How to manually expire a passsword MariaDB 10.4.17

I'm trying to expire a users password and although the following command runs successfully it doesn't actually expire the password what am I missing here? ALTER USER 'User'@'localhost' PASSWORD EXPIRE
qwertyuiop
  • 83
  • 1
  • 8
0
votes
1 answer

Delete rows from table depending on previous value

I have data set that looks like this: internal_id match_id company_id market_id selection_id odd_value update_date 1 8576748 66 1 1 1.31 2021-01-05 17:59:41 36730 8576748 66 1 1 1.30 2021-01-05…
UrukMorg
  • 7
  • 3
0
votes
0 answers

Select a specific item in a dict SQL

How do i select an item from a dict with sql? Im inserting on my table the following: {"url":"https://gcphone.nyc3.digitaloceanspaces.com/aaef9495-90dc-48ec-b913-0902f7f8759b.jpg"} But i want to create a trigger that before insert it only…
rubenferr
  • 19
  • 5
0
votes
1 answer

Value Assign and Use IF-ELSE in SELECT Query in MySQL

Example table | TIME | NAME | VALUE -----------------------+-------+--------------------- 2020-11-19 11:10:13 | A | 12.3 2020-11-19 11:10:13 | B | 14.1 2020-11-19 11:10:13 | C | 10.3 2020-11-19…
NWOWN
  • 399
  • 1
  • 4
  • 17
0
votes
2 answers

Getting Merged Datas in mariadb

I'm trying to merge datas in mariadb. I'd like to get only data that have bad result first you should watch my query I built There are 3 queries for comparing if it's turned into good data When round is 1 and it has good as a result, It's not…
Hoonjo
  • 21
  • 1
  • 4
0
votes
1 answer

How to get object from many2many table in gorm

I have self referencing many2many table in User struct of Followers. Where user_id and follower_id is foreign keys. type User struct { ID uint `gorm:"primary_key"` Name string `gorm:"size:20"` LastName string …
Justas Glodenis
  • 77
  • 1
  • 1
  • 10
0
votes
1 answer

How to set the default timestamp format for the current session in Mariadb

How to set default timestamp format like YYYY-MM-DD HH24:MI:SS.FF3 or 'Month dd, YYYY, HH:MI A.M.' to select queries running in the current session instead of calling DATE_FORMAT on each column through MySQL command.
Naren
  • 31
  • 1
  • 5
0
votes
2 answers

Display NULL values in MariaDB (LEFT JOIN gives wrong values)

So I am attempting a query selection that SUM's all minutes from an actor's role in 'Sci-Fi' films. I get the correct values when I do INNER JOIN, but it does not display the NULL values, then when I do LEFT JOIN I get completely different values…
0
votes
0 answers

MariaDB "Data truncated for column" message on a column not involved in query

I am doing a simple update query as follows: UPDATE table SET column0 = CONCAT('0x', LPAD(HEX(column1), 4, '0')) WHERE column2 LIKE 'A%'; The datatype of column0 is varchar. This gives me the error: "Data truncated for column 'column3' at row…
anthozep
  • 333
  • 5
  • 16
0
votes
4 answers

Can't use ALIAS in delete statement in MARIA DB

I am trying to delete dupes from a table but it's not letting me use alias. Tried various solutions given in several forums. the query is, DELETE FROM `table` AS t1 WHERE EXISTS ( SELECT 1 FROM `table` AS t2 WHERE…
pkt
  • 53
  • 12
0
votes
1 answer

Maria db how to use groups, unions, and/or sum/count in a select query

I've been breaking my mind for three days trying to puzzle this one out. I'm new to Maria db and sql in general. I've managed to use UNION on a previous similar situation but it's not working in this one. I have three tables as follows: create…
James
  • 3
  • 2