Questions tagged as 'mysql'

1
answer

How to select rows that match one of the columns in different tables?

I have two tables: one in which I register the games of the round and the other that registers the guesses for these games. I want to show a table where the game appears, the guess of user X and if it has already been played, its result too. At...
asked by 20.06.2018 / 17:22
0
answers

zabbix server presents error: "Failed to start MariaDB database server."

Good morning someone can help me with this error, yesterday was normal today started to present this error. I get this error when I give a restart root@Zabbix:~# /etc/init.d/mysql restart [....] Restarting mysql (via systemctl): mysql.servi...
asked by 20.06.2018 / 15:26
1
answer

Mysql above 5mil lines

Well, I'm developing a code that only came up with the following problem, when I performed a performance test with 5mil lines, it exceeded the limit of 30 seconds ... what could be wrong? $app->get('/receitagrafico/', function() use ($app) {...
asked by 14.06.2018 / 23:49
0
answers

Join laravel only 1 result

Does anyone know how I can make a join return only the first result? ->join('addresses', function ($join) { $join->on('s_complete_clients.id', '=', 'addresses.client_id')->limit(1); })     
asked by 24.06.2018 / 16:06
0
answers

mysql inner join with wildcard

I need to update on a table A by taking information from table B using inner join with wildcard to compare a snippet of content and if found in B, load a column in A. To just test this join I made the select below: SELECT vinhos.* FROM vinhos...
asked by 24.06.2018 / 21:00
1
answer

how to execute a procedure with parameter in php

I need to execute a procedure sending a parameter by php but is not returning follow the code below: //código em PHP $figura = mysqli_query($conexao,"CALL 'spare_change'.'boxlabel'('".$template."')") or die("erro no update"); //A Procedure C...
asked by 14.06.2018 / 15:59
1
answer

Select two columns also showing what is not related [duplicate]

Hello, I'm having the following difficulty: I'm using a Select that encompasses two tables tb_doenca and tb_vacina , but it does not display all values. EXAMPLE Thereare33recordsinthetb_doencatable,butwhenIusethefollowingquerry:select...
asked by 18.06.2018 / 19:29
0
answers

delete record that is foreign key in another table

I have a php project in the MVC framework. I need to confirm the deletion of records with records in another table. In Calls the user can record evolutions of this service. By excluding a precise call test if there is any evolution in it. Here i...
asked by 13.06.2018 / 15:34
0
answers

I want to transform SQL to Eloquent from Laravel?

SELECT temp.total, p.stc_sexo as sexo, count(pos.coi_posdoutorando) as numPosDout, round(((count( pos.coi_posdoutorando)/temp.total)*100),2) as media FROM ( select count(*) as total, 0 as sexo,...
asked by 13.06.2018 / 15:32
0
answers

How to add products to the cart of different pages?

I am making a cart, and I have 3 pages and 3 tables to insert products into this cart: stock_mol_comp, stock_mol_trac, stock_mol_torcao It worked perfectly when I only had compression page products. But now when I went to put the 3 pages to...
asked by 18.06.2018 / 16:14