Questions tagged as 'mariadb'

1
answer

Query sql INNER JOIN with WHERE and GROUP BY

I have this query in my database only that I wanted to insert a sum in the a.preco_produto and do for GROUP BY only if I put GROUP BY a.codigo_loja in that query of that error > # 1064 - You have an error in your SQL synt...
asked by 27.03.2018 / 19:13
1
answer

importing backup by terminal MariaDB

Yesterday I was testing PostgreSQL for insertion and backup import and export, and PostgreSQL has an SQL import command like this: psql# \i backup.sql Is there anything related to this in MariaDB(MySQL) without being plain by the t...
asked by 24.01.2018 / 23:44
2
answers

Limit Result of Inner Join

I have a problem a few days ago. I have a select that does some inners and should return 3 lines, but one of the inners has several results linked to the result searched; how to limit to this inner get only the first result and select continue t...
asked by 08.08.2017 / 15:25
1
answer

Syntax error when executing bank query [closed]

<?php class train{ var $units; var $Units; var $cl_units; var $db; var $recruited = array(); function train(){ global $cl_units, $db, $arr_farm; $this->cl_units = $cl_units; $this->db = $...
asked by 13.10.2016 / 03:21
1
answer

Tanned system with Stored Procedure

I'm trying to make a stored procedure for a simple tanned system, my table is organized like this: Tanned id INT (11) - Auto Increment post INT (11) - foreign key (id - post) user INT (11) - foreign key (id - users) Users...
asked by 26.10.2018 / 23:02
1
answer

Double INSERT in stored procedure

Currently what I basically have is this: CREATE PROCEDURE 'Teste'( IN '@valorX' INT, IN '@valorY' INT ) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER INSERT INTO tabelaX(colunaX) VALUES (@valorX) INSERT INTO tabelaY(colunaY) VA...
asked by 24.10.2018 / 15:14
1
answer

User connection location in MySQL or MariaDB

Is it recommended for me to change a user's connection location from the mysql.user table? For example, I create a user 'danilo'@'localhost' but then I want it to connect from any machine, is there another way I can do this with...
asked by 29.07.2018 / 17:43
1
answer

Bring all the necessary results in a query - MariaDB

I need to reformulate a small system, which works now but opens several connections to the database, and when there are many records, the database crashes, or when this does not happen, the page gets very slow. > So to get around this problem,...
asked by 27.04.2017 / 19:22
1
answer

IF MariaDB phpmyadmin

I'm trying to create a trigger using phpmyadmin with bank MariaDB but when it arrives in the if line it gives a message:    unrecognized statement type. (near IF) The trigger is this: SET @TOTAL = (SELECT COUNT(*) FROM cliente C WHERE C...
asked by 19.03.2017 / 19:24
1
answer

Error installing Mariadb

I'm trying to install mariadb and the system returns the following error My question is as follows, how to install into a directory other than the / var / cache ...     
asked by 21.03.2017 / 03:14