Questions tagged as 'mysql'

2
answers

How to join chains in MySQL?

I am trying to unite the name, paternal surname and maternal surname having for example a result like this: "Juan López Robles" we see how to start each word is a capital letter and follow the lower case followed by a space and so on with the ot...
asked by 25.07.2017 / 17:22
2
answers

How to concatenate a String with SQL query in PHP?

I am writing a script in php that makes a query to a sql database. The result of that query I need to concatenate it with a string. Example: the query to the database returns "Cosme Fulanito" and I need to concatenate it with a stri...
asked by 06.08.2017 / 03:17
1
answer

Group by month by adding a MYSQL field

I have this query mysql that should only give me the sum of 2 fields grouped by month of all the years that are registered in the database. It works partially (only the rows of the month add up to day 12 inclusive). SQL Code: SELE...
asked by 18.01.2018 / 14:57
1
answer

PHP and MySQL Get multiple selects checked checboxes

I need to obtain from the database, a specific user with all the interests that I have in the table [a_users_has_interest], and show them in Checkbox, but I also want to show all the Interests at the same time, and the interests of the users be...
asked by 31.07.2017 / 21:29
2
answers

error when relating by foreign key tables

I have an error when relating by foreign key, it generates the table but not the relation. I deleted the tables and I generated them again and nothing Use php artisan migrate link public function up() { Schema::create(...
asked by 17.08.2017 / 02:44
2
answers

How do I change the constraints of referential integrity once the tables are created?

I have a table called usuario . The code you use to create it is the following: CREATE TABLE IF NOT EXISTS 'cumplimiento'.'usuario' ( 'idusuario' VARCHAR(10) NOT NULL, 'pass' VARCHAR(100) NOT NULL, 'rol' INT NOT NULL, 'activo' TI...
asked by 15.08.2017 / 17:34
2
answers

How to 'defragment' an array to make an insert in the database?

In my controller perform the following arrangement $DataPerson= array( 'documentos' => $this->input->post('documentos'), 'num_identificacion' => $this->input->post('num_identifi...
asked by 22.06.2017 / 18:52
1
answer

Error executing the login: mysqli_num_rows () expects parameter 1 to be mysqli_result, string given

<?php require 'conexion.php'; $resultado = $mysqli->query("SELECT * FROM users"); if($_POST['proceso_ingreso']=="iniciando"){ if($_POST['nombreUsuario']!="" && $_POST['password']!=""){ #leyendo los paramentros ingresado...
asked by 24.06.2017 / 02:38
1
answer

Check if there is a mysql server on the network with CMD?

I'm trying to create an installer with Inno Setup which installs a Server or Terminal from a point of sale, the problem is that when I install a terminal I need to verify if the database exists in the specified Host (Server) to be able to mov...
asked by 20.07.2017 / 00:46
1
answer

I can not connect to MYSQL with python

I'm using PyMySql . I just want to do a simple "Query": "SELECT * FROM python_1", I always get this error:    Traceback (most recent call last):     File "Alumnos.py", line 5, in       connection = pymysql.connect ('localhost', 'd3h', '', 'p...
asked by 09.07.2017 / 18:47