Questions tagged as 'mysql'

1
answer

Delete record in relational tables

I need to delete a record from a relational table, the data is in the main table, as I show in the image. for this I have the following query that runs without error but does not affect the records: DELETE FROM usuario WHERE EXISTS (DELE...
asked by 17.05.2018 / 15:37
1
answer

because php sends duplicate records to phpMyadmin

I have a chat with Flash AS3 i php and I have a Hostinger bd The chat works fine but sends or receives duplicate records by pressing the Send button. That is, when I press the send button as you can see in the image, two different id...
asked by 15.05.2018 / 11:13
1
answer

Problem with the DATETIME field in MySQL

In my MySQL database in phpMyAdmin I have a table in which when I enter a date in a field of the table I put the date in millisecond format. Clicking on the field to select a calendar date appears as follows: With the bar to select t...
asked by 16.05.2018 / 07:49
2
answers

error with MySQL: Invalid parameter number: number of bound variables does not match number of tokens

A few days ago I started working with the MySQL databases on my local server, for the moment it was going well until I added the user variable, I had only done it with email but with no user, now when I added that variable I miss the error of...
asked by 28.02.2018 / 00:45
2
answers

Problem with saving data in the database

For some reason it does not save it, the $ _POST receives it correctly, but in the save function where I execute the SQL it does not do not understand why the function is this function guardar_dominio($input, $conn) { if(isset($input['id'...
asked by 24.08.2018 / 16:21
3
answers

SQL Error (1111): Invalid use of group function

I have a MySQL query to extract the budgets of the last year (the highest year registered in the table): select * from Presupuestos where year(fecha) = max(year(fecha)) the date column is of type DATE. When executing the query, it shows...
asked by 05.02.2018 / 09:07
4
answers

Delete with Select in Mysql

Good, I tried to make a query to delete all the tickets that do not have details, but it gives me an error of sql syntax. DELETE FROM ticket t JOIN ticketdetail td ON t.id = td.idticket WHERE (SELECT count(*) FROM td JOIN t ON t.id = td.idtic...
asked by 06.02.2018 / 10:07
1
answer

function to eliminate columns fails (MYSQL)

Hello, how are you? I have a mysql function that at one moment worked, and now for no apparent reason fails, and I always throw the same error, here the code CREATE DEFINER='root'@'localhost' PROCEDURE 'borrar_columna'( IN 'nombredecolumna...
asked by 20.12.2017 / 21:09
1
answer

Sort by Mysql

Good day friends I have a doubt to the I do the following query As a result I get this Is there any way to bring the data in the order in which the query was made? That is first the data of Id 1, then those of 3, and finally those of...
asked by 20.12.2017 / 07:19
1
answer

MySQL does not collect data

I am trying to collect data to show on my page comments but not the table ... Can you help me? I have attached code and database capture. <?php $host_name = 'dbxxxxxx.db.1and1.com'; $database = 'dbxxxxx'; $user_name = 'dboxxxx'; $pass...
asked by 15.01.2018 / 08:30