Questions tagged as 'mysql'

1
answer

Cartesian product with random select mysql

I have managed to make the query: select * from (select x from a ORDER BY rand() limit 15) as a, (select x2 from b) as b The output is: 1 | a 1 | b 1 | c 3 | a 3 | b 3 | c 2 | a 2 | b 2 | c But what I need is that really the...
asked by 09.09.2018 / 00:36
0
answers

Help with UPDATE IN MySQL

Hello friends, good evening, I have problems with my code and I can make it work, but I can not change the record in the database. <?php require_once('Connections/clientes.php'); ?> <?php function GetSQLValueString($theValue, $theType...
asked by 11.09.2018 / 06:29
0
answers

Problems creating functions in MySQL

I'm trying to create the following function in MySQL Workbench: DELIMITER $$ CREATE FUNCTION 'capturar_consecutivo'() RETURNS INT BEGIN DECLARE num INT DEFAULT 0; SET num = ( select * from consecutivo); RETURN num; END $$ DELIMITE...
asked by 06.09.2018 / 20:29
1
answer

I can not connect to the MySQL database with Slim

I'm doing a test and I want to connect to the database Tarea2 and show the table EMPLEADO but I can not connect. My user is root , for simplicity of the task I do not have passwords This is my code. $app->get('/EMP...
asked by 09.08.2018 / 21:27
1
answer

Insert a date value with PHP in MySQL

I would like to introduce MySQL information through a PHP form with your date of birth. The problem is that no matter how hard I try it in the DB, the 0000-00-00 value is introduced. If I write the date directly on the Insert there is no problem...
asked by 08.12.2018 / 08:42
0
answers

Problem with DISTINCT when adding the ID column

I have the following query; SELECT DISTINCT coordx,nis,nic,ct,medidor,coordy,comentario FROM nis_cap This query brings me 544 records; The problem is that if I modify the query to add the ID, DISTINCT does not work as I expect;...
asked by 13.10.2018 / 16:27
1
answer

Mariadb Vs MySql

Recently I made the migration from one page to another server. I began to observe a strange behavior of a module. Perform the inspection of the module and I see an SQL query was not throwing me the expected results. After making the breakdown of...
asked by 07.06.2018 / 18:01
1
answer

HOW TO REMOVE REPEATED ROWS IN MYSQL

Friends, good evening, I hope and you can help me ... I have the following inconvenience or good is not an inconvenience is rather ignorance ... I have this table in Mysql and I need to make a selection to the database and can show...
asked by 18.06.2018 / 05:10
1
answer

Notice: Undefined index php

Hello, I'm trying to send data to a procedure stored in mysql when I send the data to the php I get errors in the image this is the form in html: <form method="post" action="llamada.php" name="formulario"> <input type="text" requi...
asked by 30.10.2018 / 22:31
3
answers

Query ready MySQLi

Good people I want to ask a question about How to translate this code in PDO to MySQLi ? I'm having problems how to take it to MySQLi any ideas. Greetings. $stmt = $conn->prepare("SELECT * FROM usuario WHERE rut = :codigo"); $s...
asked by 30.10.2018 / 15:18