Questions tagged as 'mysql'

1
answer

NullPointerException in connection with database

Anyway, I'm getting a nullpointerException so I have no clue how to deal with it, I read the net on and apparently the problem is in uninitialized variables and stuff like that, but I'm sure everything has been initialized here. Servl...
asked by 19.11.2017 / 16:24
1
answer

select part of the JSON that was filtered in the where

In the database I have a field called resources, in it I keep the permissions of a user, in the format Json: [ { "rota":"reserva", "sref":"oQueFazer", "ordem":"1", "recursos":[ "index", "show", "stor...
asked by 26.10.2017 / 03:42
2
answers

Column 'ActiveCirculatingTotal' can not be null

I'm finding it very strange what's happening because yesterday worked perfectly! I have created the following code:      require_once 'credenciais.php'; //pega dados do formulário de ativo e passivo circulante $ac = isset($_POST['ac']) ? $...
asked by 26.10.2017 / 17:36
1
answer

Express return post

Good afternoon, I have a problem with the POST return in express, I wanted to make a user registry using the following code: router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des...
asked by 11.10.2017 / 20:02
1
answer

Update table in wrong format

update table set pontuacao='$var1' where id='1' AND diadojogo > '2017-09-28'; update table set pontuacao='$var1' where id='1' AND diadojogo > 2017-09-28 ; update table set pontuacao='$var1' where id='1' AND diadojogo > '$data'; I kno...
asked by 29.09.2017 / 01:53
2
answers

How to handle QueryException error SQLSTATE [23000]: Integrity constraint violation: 1062 Duplicate;

The id is auto increment, but the id_uc is unique, just not to enter an id_uc equal. I want you to return to view a message. $storm =new ListaStorm(); $storm->id = $id; $storm->id_uc = $id_uc; $storm->save(); error message? @fore...
asked by 28.09.2017 / 23:47
2
answers

Print a sum in the view

MySQL WorkBench    ErrorException Array to string conversion public function listadepontos() { $id = auth()->user()->id; $somas = DB::SELECT("select SUM(pontuacao) FROM palpite WHERE id_u = '$id' "); return view('pontu...
asked by 29.09.2017 / 03:07
1
answer

Comparison of tables

I am creating a system of bolão, where the administrator registers the games and the scoreboard, and the user has the option to kick a scoreboard, if this score is the same as the one registered by the administrator he informs that the user has...
asked by 06.11.2017 / 12:24
1
answer

MySQL Error - Stored Procedures

I'm creating this procedure to run once a day, as I have no experience, I got an error in the code below: CREATE (definer omitido) PROCEDURE 'MULTAOFF'() BEGIN set @multado = (select 'CPFAluno' from multa where 'dataMultaFim' &l...
asked by 07.11.2017 / 13:22
1
answer

Help with ajax to send new variable value on this page without refresh via radio button

I'm trying to make a table with a radio that when I click, it changes the order that the contents of the table is displayed, I saw that the way to do this is with ajax, but I do not have much time remaining, and from what I saw ajax I could not...
asked by 06.11.2017 / 21:54