Questions tagged as 'mysql'

1
answer

Problem when registering a product

The problem I have is that when I register, in this case a product, it registers normal but the problem is that it registers it 2 times, it registers everything well in the Database but what happens is that it sends it 2 times and Obviously an e...
asked by 13.05.2016 / 05:16
1
answer

INSERT INTO does not work

I want to thank everyone for their time in advance. When I try to insert a series of data in a table called "comments", the affirmative answer of the mysqli_query that I placed inside the "if" is not given. I have checked in detail the databa...
asked by 02.05.2016 / 03:35
2
answers

List with commas in PHP and MySql

In a page of PHP I have a query of MySQL simple. The final result is a list. The part that generates the result while($row = mysqli_fetch_array($result)) { echo "<a href='".$row['url']."'>".$row['Name']."</a>, "; }...
asked by 26.04.2016 / 15:44
3
answers

Print result if all rows match PHP MysQl

I have a problem, I'm a PHP starter, I have a table where I keep the items that contain an order. Each item is marked as YES, if it has already been distributed, and it is marked as YES if it has already been delivered, since this may happen...
asked by 21.03.2016 / 19:01
1
answer

update in chain

I have a table that has several tasks, the idea is to "finish one" and start another, but I do not know how to formulate a query like this I have the following: create table tareas( id int not null PRIMARY key AUTO_INCREMENT, idvinedo int...
asked by 01.10.2018 / 05:23
2
answers

How to obtain the incremental auto value in sql server 2012?

Hello everyone diculpen by this question may be something unusual or absurd, but I am looking for the autoincrementable value of a table. In MySQL it's this SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '...
asked by 14.11.2018 / 03:08
1
answer

Create an array with date and time data in php

I have to create an array in PHP with information that comes from a json. Currently I have my code that creates an array where it keeps the date "10-15-2018" with its total number of messages. Now I need to modify my array to be able to ca...
asked by 22.10.2018 / 03:07
1
answer

Format to show Query response in MySQL

I would like to know if there is a way to get the last two weeks and its amounts in SQL, I explain: The following query brings me the last two weeks with its quantities of the same product: $first = strtotime('last Monday -14 days');...
asked by 01.09.2016 / 14:54
1
answer

Mysql forces me to fill in fields not null suddenly [mysql mode strict]

PHP PDO or MYSQL is forcing me, from one day to the next, to save fields not null of a table, before, if it was an integer, mysql automatically put a 0 . Let me explain. I have this table: clients id int auto incremental not...
asked by 25.04.2018 / 15:58
1
answer

Mysql and php dates

I need to bring some data from a person table, especially the birth field, but I need at birth to only show me the year and I can not do it, it throws me empty. How else can the problem be solved? Note: Placing only the query to test it on...
asked by 04.04.2018 / 20:31