Questions tagged as 'mysql'

2
answers

join results in mysql

Hello I hope you can help me  the truth is that I do not know how I can unite the results SELECT p.SKU, p.pt_part, p.pt_color, p.pt_talla, p.pt_draw, p.pt_promo, p.pt_desc1, p.pt_rev, o.pod_part, o.po_n...
asked by 23.02.2017 / 13:57
4
answers

Upload Files with Php and Ajax

I am new with Ajax I try to upload files to my folder and store the path in my MySQL, these are my advances: I have my modal window, with which you place the data of the file: <form class="form-horizontal" action="../../phpcrud/create_do...
asked by 14.03.2017 / 20:06
1
answer

Problem with select to show records

I am developing a fixed asset management system and I have a query that brings me information from different tables, one of the tables called kz_sgaf_distribdebajas (distribution of casualties) keeps records about asset losses that have b...
asked by 23.02.2017 / 06:55
2
answers

Error creating foreign key in MariaDB

I have the following 3 tables: CREATE TABLE tEstado (idEstado INT NOT NULL AUTO_INCREMENT, Estado VARCHAR(100) NOT NULL, PRIMARY KEY(idEstado), INDEX(idEstado))ENGINE=INNODB; CREATE TABLE tMunicipio (idMunicipio INT NOT NULL AUTO_IN...
asked by 04.03.2017 / 22:49
2
answers

Fields in a form that are not completed are saved as NULL in the database or ignored in the query

I have a form with different inputs, of which the vast majority are not necessary to fill (and some of these are inputs that are related to other tables), my question is, when these inputs are empty, how do I do that are not added in the insert...
asked by 21.02.2017 / 15:01
3
answers

Group SQL query results by a field

I have a table like this: | ID | id_foreign | cosa | ------------------------------- | 1 | 1 | cosa1 | | 2 | 1 | cosa2 | | 3 | 2 | cosa1 | | 4 | 3 | cosa1 | | 5 | 4 | c...
asked by 10.02.2017 / 12:44
2
answers

Filter query using foreign key

I have the following tables: Tabla 1 ---------- id *fk_ciudades datoX1 datoX2 Tabla 2 ---------- idCiudades nombreCiudades And I want to make a query that selects one of the rows of Table 1 , when a variable x that I pass, is equa...
asked by 18.02.2017 / 23:17
1
answer

Database with socket.io and node.js

I am trying to create an application of the type messenger. I connect to the database using node.js mysql. Each person who logs on the website is initially connected to a room for example: "room juan" (only John connects to this room) said room...
asked by 18.02.2017 / 15:25
1
answer

Show MYSQL results in Horizontal

I have the database of DATA created in this format. the code you use for the query is the following: only that the class table increases The column Bimester to demilitar the query. <table class="table table-bordered table-striped t...
asked by 18.02.2017 / 18:09
2
answers

sql problem in php

I have a problem in the trend of SQL in PHP $where = ''; $sTable = "clientes"; $type = 'client(1);'; $usid = $_COOKIE['c_user']; $where = "";; if($_GET['q']!= "" ){ $where.= " WHERE fullname like '%$q%' AND user_id=1 "; } $whe...
asked by 21.01.2017 / 21:23