Questions tagged as 'mysql'

1
answer

Web form update help

I'm developing a CRUD system, and I'm having trouble updating registered users. The bad news is that my browser does not show any errors. The problem is that when I do edit in some field, for example, email, where it was written [email protected]. D...
asked by 24.11.2016 / 18:43
1
answer

Allow null value in relationship field

I have a MySQL database with tables t1 and t2 . One of the columns in the t1 table has a foreign key for t2 . You need to allow the foreign key column to accept null values. There are already important...
asked by 05.10.2016 / 20:44
2
answers

Generate autoincrement serial number sequence

I want to generate a service order number, I have the code, but I do want it to query the last number of the service order that was generated in the database. Follow the code: def rangeOrdemServ(self): db = self.conexaoBanco()...
asked by 04.10.2016 / 16:18
2
answers

Where in Join - Sequelize

Hello, I want to do a search inside several tables, for example: SELECT * from tab1 INNER JOIN tab2 ON tab1.tab2_id = tab2.id WHERE tab1.name LIKE '%blabla%' or tab2.title LIKE '%blablabla%' How would you do this query with S...
asked by 23.09.2016 / 22:06
3
answers

You can use two columns of the same table in a WHERE [closed]

In a select I can use in the where to filter the results, two columns of the same table? Ex: Select id, idpai, nome FROM tabela Where id=idpai     
asked by 14.09.2016 / 08:01
1
answer

How to retrieve data from an open HTML form in a WebView?

Hello! I have a responsive web application that I intend to open via android application through a WebView. Well, the only problem is that I would need to grab some data from the submit from only one application form to send to a bluetooth print...
asked by 15.09.2016 / 18:13
1
answer

Query string works in Phpmyadmin and does not work in PHP

I have the following query that takes a date, has been tested in phpmyadmin and in the HeidiSQL program successfully: Query Mysql set @rn:=0,@grp:=0,@prevdate:=''; from (select DataEncomenda, @rn:=@rn+1 as rownum, @grp:=if(@prevdat...
asked by 01.12.2016 / 15:01
1
answer

Get elements of a dependent column from another [duplicate]

I have to make a Table that indicates the "name2", "local" and "name" of the animals in greater number in each "name". SELECT DISTINCT OP.nome , OP.localizacao , AD.nome_cientifico FROM C AD , A OP, B CP WHERE OP.id_aquario = CP.id_aquar...
asked by 01.12.2016 / 20:12
1
answer

Get the largest elements of a SQL column

I have 3 tables and I have the following question to solve: "Get the" name "with the highest" perce "related to" num2. "Enter" num2 "through" Name2 " -- A (name,Num2, local) insert into A values ('Favela',1,'WE'); insert into A values...
asked by 01.12.2016 / 00:45
1
answer

How to retrieve parameters in php passed by $ http ({... data: ...?

I have my controller that requests the login: app.factory('LoginService', function($http, $location, SessionService) { return { login: function(data, scope) { $http({ method: 'GET', url: 'http://localhost:88...
asked by 27.11.2016 / 19:25