Questions tagged as 'mysql'

1
answer

Error executing INTERSECT in MySql

I want to select the employees of the employee table who are managers, so I'm trying to use INTERSECT but it's not working, I think the image says it all too, would you have another way to do it?     
asked by 11.06.2018 / 20:25
1
answer

Problem returning a query

Why when I run the query below, it returns records: SELECT COUNT(DISTINCT(dadf332.numped)) AS qtdped, DATE_FORMAT(dadf331.datlan, '%d/%m/%Y') AS datavenda FROM dadf331, dadf332 WHERE dadf331.numped = dadf332.numped AND tipped = 0 AND da...
asked by 13.06.2018 / 15:02
1
answer

MySQL SELECT with ORDER BY in GROUP BY

I have a table called contacts , where all contacts made on the site are registered. There is also a table named status , where the service status of each contact is stored. In doubt, I need to SELECT contacts, and in LEFT JOIN only show...
asked by 13.06.2018 / 13:31
1
answer

Account with data and mysql data

Good afternoon, it's the following in my project I need to make an account so in the end to have the result for the client to know how much to pay, but I'm not able to do this account. In my case, I ask the days and then the room will have a pri...
asked by 06.06.2018 / 19:44
1
answer

Overlapping content on page

I have two forms that are superimposed on the rest of the page I needed opinions about what the error is causing this and how to put the forms below the remaining content <div style="background-color:#F8F9FA">...
asked by 06.06.2018 / 11:15
1
answer

AUTO_INCREMENT custom

I have in a MYSQL db two tables that are linked: ADMIN id - nome - empresa Each admin adds several values to the docs table: DOCS id_doc - id_admim_doc - doc - valor The id_admim_doc column is a forei...
asked by 05.06.2018 / 05:52
4
answers

Count number of records in a MySql table with PHP?

People, I have a database with a table called "users", and I would like to know how I can, through PHP, count how many records there are in this table, and then give an echo to show this amount on the page. Please help me !!     
asked by 02.06.2018 / 17:22
1
answer

Error - Select with SUM

Expensive; I have a table with a lot of information, including a field with ticket_value and one with maturity. I tried the query below, but without success: SELECT * FROM boleto WHERE extract(year_month from vencimento) = 20180...
asked by 01.06.2018 / 22:29
1
answer

How to do SQL query using like comparator and multiple values out of order

I looked for answers here in the community but found nothing specific. I have a page where I can search the names of clients previously registered in a MySQL database. I am currently using the following statements: PHP: $valor = str_replac...
asked by 01.06.2018 / 07:20
1
answer

Does not matter the products for the cart PHP || MYSQL

I'm making an online store and I'm having trouble making the cart, when I click on the icon to add to the cart, it does not matter and the cart is always empty. Andtheresult: Thisisthebuttoncode include ("db.php"); $molcomp_que...
asked by 30.05.2018 / 11:12