Questions tagged as 'mysql'

2
answers

PHP Database error

I uploaded my site (using filezilla) using php / mysql. In localhost it works perfectly but not on external server. The following error appears:    SQLSTATE [HY000] [1045] Access denied for user 'root' @ 'localhost <?php try { $pdo...
asked by 07.03.2014 / 18:29
2
answers

Group by mysql adding null values

How can I add empty values in group by ? Example: I have a query that is organized by ages: CASE WHEN TIMESTAMPDIFF(YEAR, STR_TO_DATE(DataNascimento, '%d/%m/%Y'),CURDATE()) < 4 THEN 'Menos de 4' WHEN TIMESTA...
asked by 27.07.2017 / 16:42
1
answer

Register of IPv4 and / or IPV6 in the database [closed]

The Internet works through protocols such as IPv4 and IPv6, having 32 bits and 128 bits, which are numerical combinations that establish connections between computers. I have a device table, tbl_device , in which I need to send status of...
asked by 17.04.2017 / 18:07
1
answer

Select fields to return in a SQL INNER JOIN

How do I get into a single SQL statement line, type SELECT * FROM table1 INNER JOIN table2 ON xxxxx , and the desired return would be all fields (columns) of table1 and only one field (column) of table2 ? >     
asked by 25.04.2017 / 16:49
1
answer

How to complement this sql query?

I have the following tables below, where schemas (columns) are described in parentheses and the primary key appears in bold: student ( codaluno , nombrealuno, dt_ingresso, codcurso) course ( coding , coursename) ( codaluno , codturma , ave...
asked by 30.09.2014 / 20:05
1
answer

Mysql Connection Does Not Appear in Data Connection

I've updated my Visual Studio to 2017 and am trying to connect to a MySQL database through the Entity Framework. What happens is that the option to connect to MySQL does not appear: OnlySQLServerappears.IhavealreadyinstalledtheConnector/Nett...
asked by 30.03.2017 / 03:27
2
answers

How to update or insert MySQL in the same query?

In PostgreSQL, I have to use upsert . It checks if the line already exists, if it does, it does update, otherwise it does insert. In MySQL I am not able to do this, I saw some talking to use INSERT ... ON DUPLICATE KEY UPDATE , ho...
asked by 23.05.2017 / 05:42
2
answers

Check if email is registered in the DB

I'm doing a search in my DB to check for email, avoiding the registration of it again, but I'm having a problem with the return, the script below sends and treats the return. if (sender.getFieldName() == 'Email') { if (sender.getValue()) {...
asked by 10.08.2017 / 20:26
3
answers

How to get the total percentage and individual and per field in ASP Classico

I have the following scenario: My DB (in MySQL) has 1 million users, of which it is divided into 3 categories of register: Male, Female and Transsexual. The goal is to categorize as follows. Example: Total 1,400,005 Users Male - 30%...
asked by 13.08.2017 / 18:41
1
answer

Help with TRIGGER MYSQL [closed]

I need to mount a trigger that before deleting a user it checks if there are any events linked to the user in question, and if it exists, do not allow delete, but never worked with Triggers . Can anyone help me? I have the usuario...
asked by 05.12.2016 / 20:04