Questions tagged as 'mysql'

0
answers

Duplicate values in column that is foreign key

When trying to insert a new data into a given table (official), I have a column named "managerID" which is FK of the "official" table itself. During the registration I send the ID of another employee in this column, only it is returning that...
asked by 28.01.2018 / 23:08
1
answer

AutoComplete / Suggestions / MySQL

Question 1: Does anyone have any working example of when someone types in an input suggestions below? preferably from a table created in mysql.    Bank: test   Table: users (user_id, user_email). Question 2: In an "option value" how could...
asked by 03.02.2018 / 03:56
0
answers

Because in phpMyAdmin the "propose a table structure" function is not coherent?

I have 2 tables with fields and types EQUAL: in Windows 2012 / php v5.6 mysql v5.6.38 with MyISAM latin1_general_ci and in Linux 5.2 / php v7.1 mysql v5.6.38 with MyISAM utf8mb4_unicode_ci When you click to propose a table structure, th...
asked by 05.02.2018 / 21:36
1
answer

Problem with Mysql net connector and Entity Framework

When I install the mysql connector in version 6.9.11, I can see the driver for ADO.Net, so far so good. ButwhenItrytocreatethetemplateIgetthefollowingerror: Now when I install the connector version 6.10.6, I can not see the driver for A...
asked by 05.02.2018 / 22:48
0
answers

Delay in executing a file

I have a cents auction script, and there is a PHP file that is responsible for entering the customer's bid when the button is clicked. That is, when the customer clicks the button to bid, it triggers this file and inserts the bid into the pro...
asked by 26.01.2018 / 02:13
0
answers

MySQL Upgrade / MariaDB

Well, I currently use version 10.1 of MariaDB on my server with cPanel. I thought about upgrading to version 10.2 to see if I get a little performance. However, the following warning is displayed for me:    MariaDB enables "strict mode" by...
asked by 26.01.2018 / 01:30
2
answers

mysqli error: "expects exactly 2 parameters, 1 given"

You're giving this error:    Warning: mysqli_select_db () expects exactly 2 parameters, 1 given in My code is this: define("HOST", "localhost"); define("USER", "meu-usuario"); define("PASS", "minha-senha"); define("BDNAME", "meu_banco_d...
asked by 16.02.2016 / 01:19
1
answer

Doubt with query LIKE

I developed a function that searches the database for a client by ID: function buscaId ($id,$conexao){ $resultados= array(); $query= "select * from cliente where id like '$id%' "; $resultado= mysqli_query($conexao,$query); whil...
asked by 01.02.2018 / 12:54
0
answers

Change value of mysql system variable

Server version: mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 By searching I would just change the file /etc/mysql/my.conf and insert the new value, that's what I did. Then according to...
asked by 06.02.2018 / 15:45
2
answers

Query in mysql does not work

I need to display a report and my query is this: SELECT f.nome, count(hv.id) as qtdvendas, sum(hv.total) as totalvendido, sum(iv.valor_venda - iv.valor_compra) as lucrototal, ROUND(sum(iv.valor_venda - iv.valor_compra)/count(hv.id), 2) as lu...
asked by 27.01.2018 / 19:16