Questions tagged as 'mysql'

0
answers

Connection to external database [closed]

I created a database on 000webhost and I created a connection with PDO to access it from my localhost on vertrigo <?php //CONSTANTES define('HOST', 'databases.000webhost.com'); define('USUARIO', 'meuusuario'); define('SENHA', 'minhasenha');...
asked by 09.10.2017 / 05:47
0
answers

DB ERROR: SQL syntax; [closed]

I'm trying to create a temporary table with football team data, but I get this error:    DB ERROR: You have an error in your SQL syntax; check the manual that   correspond to your MySQL server version for the right syntax to use   near) and t...
asked by 26.09.2017 / 15:13
1
answer

Menu, NAV Bootstrap dynamic submenus with PHP PDO Mysql

Good evening. I need to put together a dynamic, three-table menu that needs to be interconnected, but I'm lost. Here's a part of the organization chart below: Atthemoment,Ihavethefollowingcode:<liclass="dropdown"> <a href="#" cl...
asked by 26.09.2017 / 03:46
1
answer

Sort by the result of the sum of two SUM - MYSQL

Hello, I need to sort a query by the result of the sum of two sums.    ORDER BY SUM (SUM () + SUM ()) I've tried the following: SELECT SUM(campo1 + campo2) AS soma1 , SUM(campo3 + campo4) AS soma2 , SUM(soma1 + soma2) AS o...
asked by 26.09.2017 / 13:51
0
answers

Database with Municipalities, City, Neighborhoods [closed]

Does anyone know where I can get a database with *States * Counties * City * Neighborhoods in Brazil ?     
asked by 18.02.2018 / 03:25
0
answers

Ignore registration when MySql / PHP information is missing

I have a PHP registration form in the MySQL database. After completing the form , the user is redirected to the page cad.php where he says that the registration was successful and in 3 seconds it is redirected to login page. The pro...
asked by 08.09.2017 / 22:25
1
answer

The use of the handler function is skipping the ids. How do I prevent this from happening?

See the example: create table time( id int not null primary key auto_increment, nome varchar(50) unique )engine=innodb; delimiter $$ CREATE PROCEDURE insertteam (nometime varchar(50)) begin declare continue handler for 1062 select 'vc ja inse...
asked by 05.09.2017 / 21:39
0
answers

How to make selections through the Workbench Diagrams?

I'm migrating to Mysql WorkBench and I need to perform a relationship between SELECT... INNER JOIN... LEFT JOIN... tables, but I wanted to perform through the Diagrams schema. How can I proceed in this case?     
asked by 06.09.2017 / 21:19
1
answer

Conditions on dates in MYSQL know the last record and penultimate

This is the following I need to perform a query in my database by the last date of registration and where the featured is = to 0. I execute this way without problems: SQL1 = SELECT id, created, featured FROM roexd_content WHERE created = (SELE...
asked by 29.09.2017 / 21:34
1
answer

How to select an option in select less laborious way?

I have a page called editarpublicacao.php which receives id through GET . One of the two <select> for example contained in the page, is similar to that of the companies: <select name="company" data-plac...
asked by 29.09.2017 / 17:43