Questions tagged as 'mysql'

0
answers

Use cursor to update a MySQL table, based on a search

I would like some guidance on a challenge in MySQL 8. I have two tables: usuarios (id_user, nome, nascimento, endereço, cidade, ...) utilizacao (id_medicamento, nome, nascimento, medicamento, data, ...) The usuarios table stores all...
asked by 24.08.2018 / 15:20
0
answers

initial SQL to list clients (PF and PJ). How to migrate a pure SQL Query to Eloquent from Laravel?

I set up an initial SQL to pull the data. It is working in pure SQL. I need to migrate this code to Laravel's eloquent pattern. Can someone help me? Thank you! Here is the sample SQL: Code: SELECT c.cod_cliente, p.cpf, p.nome, ct_m...
asked by 29.08.2018 / 16:56
0
answers

MySql Removed and Performing a New Installation - Problem

Good evening,   I made the removal of my MySql that was already installed on the PC (including removing the regedit records, deleting hidden folders) and now I'm trying to install it again, however the installer opens goes to step "Please wait w...
asked by 24.08.2018 / 02:05
0
answers

mysql relations in laravel 5.5

I'm trying to model with Laravel a database for purchases, in my mysql the relations are thus , then I was modeling in Laravel, for the associative table "supplier_detail_item" I used "belongstoMany" relation, it worked out using tinker. Now...
asked by 23.08.2018 / 21:56
1
answer

Report Viewer - unconfigured app.config

I am not able to make a Report Viewer connection with Mysql, it does not appear in the "Choose Data Source" list. I believe the problem is in the "app.config" which is unconfigured could someone pass me the whole code from the "app.config" to th...
asked by 24.08.2018 / 06:10
3
answers

Obtain the sum of the authors' books with Mysql

I'm starting with the sql and I'm trying to get the sum of all the books from each user in the cart table, but I'm not getting it. drop table if exists carrinho_de_compras; drop table if exists usuario; drop table if exists livro; create tabl...
asked by 20.08.2018 / 17:38
1
answer

UPDATE NO MYSQL [duplicate]

I have an encrypted field in the MYSQL database. I'm trying to update this way UPDATE USUARIOS SET SENHA = md5(1234) WHERE ID = 216; but gives me this error message:    Error Code: 1406. Data too long for column 'PASSWORD' at rom 1  ...
asked by 21.08.2018 / 22:05
1
answer

Node.js: How to extract information from the database and show in HTML pages

I've learned how to fetch information from the MySQL database, but I can not manipulate this data to expose it in HTML pages. The code that I will expose below I got from w3school: var mysql = require('mysql'); var con = mysql.createConnectio...
asked by 20.08.2018 / 18:43
1
answer

Erase Mysql data

I have a table with a large amount of data (380 million). I need to delete the old data that is no longer useful in the system. I'm generating the backup as a precaution. What is the best way to delete it? Delete with a delete restricting...
asked by 21.08.2018 / 20:50
0
answers

How to write the value of a bootstrap select in the database?

I'm developing a system, and I need to write to the database data from a select option. When saved, it gives an error saying that the "type" field is null. Here is the code for better insight. View <div class="form-group">...
asked by 26.08.2018 / 18:38