Questions tagged as 'mysql'

1
answer

Save single row in DB, the result of the PHP variable (WHILE / LOOP) of a MYSQL Query

I have the following problem: When performing a query, the result of the while is composed of more than one value, for example: $query_sku = mysqli_query($connect, "SELECT t.column_name FROM skus AS s INNER JOIN table...
asked by 04.01.2019 / 15:12
2
answers

Database to work with nodejs [closed]

I'm developing an entire application with NodeJS. The main reasons for using NodeJS are financial / performance. I have not yet worked with the database using NodeJS, however I have some doubts, since the data load is great. For compari...
asked by 09.05.2014 / 11:51
1
answer

How to insert an image in MySQL?

I would like to add images to the table, nothing too complex. I would like to add the directory if possible This bank will not have an interface I would like to see the image by select, but I do not think that is possible. What do you...
asked by 25.05.2014 / 21:14
2
answers

How do I create a function that returns the lowest expiration date between batches of a given product?

How do I create a function that returns the lowest expiration date between batches of a given product? Dry my SQL code: create database Exemplo; use Exemplo; create table produto (codProduto integer not null, nomeProduto varchar(50) not n...
asked by 26.11.2014 / 18:21
0
answers

Client report in MYSQL [closed]

Good evening, gentlemen, how are you? I'm facing a problem and I'm not able to resolve it. Below is an example of the structure of my database: IneedtomakeascriptinMYSQLthatselectspeoplewhomeetthefollowingconditions:1-PESSOA_ENDERECO.UF="...
asked by 13.12.2018 / 22:08
2
answers

Design workflow table

I'm doing an application in Cakephp and would like your help on what would be the best way to create my database and my relationship between the models . It would be a "workflow". I would like it to work as follows: 1- This application...
asked by 03.02.2014 / 23:01
1
answer

Update with SET giving error

I have several UPDATE with pretty much the same code as this: UPDATE cliente SET Email = '[email protected]' WHERE idCliente = 0000; But some give this error:    Data truncation: Data too long for column 'Email' at...
asked by 10.08.2018 / 03:30
1
answer

Pick up bigger ID and insert Bank

My doubt is that I need to get the ID with the highest value and enter the information in it. The PHP file is working but I need it to identify the ID with the highest VALUE and insert it into it instead of creating another one. StartReport.p...
asked by 12.11.2018 / 00:38
1
answer

MySQL search by record creation date

I want to do a mysql search by creation date of all records, that is, I want it to show the record and the date it was registered. I've researched but what always shows is between but that's not what I'm looking for. What should I do?  ...
asked by 12.11.2018 / 18:57
0
answers

Optimize query by reducing subqueries (+ 1 alias per subquery, is it possible?)

I would like to reduce the number of queries in my query. As the data is distributed across different tables, I am collecting the necessary information through comparisons with your IDs. Today my query is this. It is functional , but it shou...
asked by 06.12.2018 / 19:57