Questions tagged as 'mysql'

1
answer

conversion error from my_sql to PDO

I modified my connection page with the MYSQL database for PDO but it is showing error, could anyone help me? There is a file that pulls the necessary information from the database to be sent to the index of my site and presents the last 5 commen...
asked by 12.10.2016 / 18:40
1
answer

UPDATE does not update table

I'm not able to update my fields. Where am I going wrong? I get the id through GET and I can display the data in the table, but I can not update it. FIELDS $id_destino = $_GET['id_destino']; $destino = mysql_real_escape_s...
asked by 26.04.2014 / 00:42
1
answer

My SQL Installation

I am installing MySQL Server on my machine by following the step-by-step, however, the installation does not appear in the MySQL Server Instance Configuration Wizard. I also can not find it in Start > All programs > MySQL > MySQL Ser...
asked by 31.03.2014 / 21:07
2
answers

Is it possible to use IF within the FROM in MySql?

Could it be IF within FROM ? I searched but could not find anything about it. Here is an example of what I want to do: SELECT usuario.* FROM ( SELECT IF( (SELECT COUNT(*) FROM pessoa) > 0, SELECT FROM pessoa,...
asked by 24.05.2016 / 22:13
0
answers

Pagination angular error [closed]

I read about paging after implementing the code, however, when I tried some of the suggestions that gave me an error, this was one of them ( link ). I added in html the pagination div , I changed the controller with the example code,...
asked by 27.12.2018 / 18:01
1
answer

Relationship of tables using FK's [closed]

I'm making a system for the user to create an account and select the movies they've watched. I have a table in MySQL movies to register all the movies on the site and a table generos that is only the genres of movies (action, adventure ...) a...
asked by 03.09.2015 / 04:19
0
answers

Return of duplicate records in MySQL

Good morning, I have a problem. I do a search and return repeated values, but if I do not use join in the timetable the results are right.     
asked by 24.12.2018 / 15:06
1
answer

MYSQL - Error Code: 1451. Can not delete or update a parent row: a foreign key constraint fails

I have to do a trigger, where to be excluded an employee will also be excluded its dependent. But I can not exclude. the code looks like this: delimiter $ create trigger TRG_excluiDependente_AD after delete on Funcionario for each row begin...
asked by 09.12.2018 / 13:36
3
answers

Query problem - Accentuation

My MySQL database is in UTF-8, pages in UTF-8, so far everything works. No problem with charset . The problem is when I search something (company) in the search, for example: I type "A" and it returns companies that have this initial lett...
asked by 14.07.2015 / 22:58
4
answers

How do I not allow "" and "" in my Insert [closed]

Well, I have an INSERT, and I would like to have someone else type in the text something with "<" or ">" Code: $autor_id = $_POST ["autor_id"]; $texto = $_POST ["texto"]; $query = "INSERT INTO 'videos' ( 'autor_id' ,...
asked by 26.07.2015 / 09:09