Questions tagged as 'mysql'

1
answer

MySql PHP query id varchar does it as a numeric

I have a MySql database, a student id is a varchar of 11, numbers are stored in this field but can start in zeros. for example 00000321. but it can also store 000321, but when consulting through jquery to PHP with id 0321 without the leading zer...
asked by 05.07.2017 / 06:23
1
answer

MySQL: multiple conditions to different columns in MySQL

I want this question to come out in a single row: select (case month(p.fechaVent) when 1 then sum(p.totalVent) end) AS "ENERO",(case month(p.fechaVent) when 2 then sum(p.totalVent) end) AS "FEBRERO" from proformas p group by mon...
asked by 03.07.2017 / 19:09
2
answers

re-enumerate the primary key with auto incrementmysql attribute

I have a BD with 278 records that import from excel in CSV format, the problem is that I started to number the id from 278 onwards now what I want is to number them correlatively from 1 ... it is worth mentioning that they are primary key auto i...
asked by 04.07.2017 / 15:41
2
answers

How do I save an array in the column of a database record, using PHP?

I'm doing it in the following way but in the bd it keeps me "array" and not the fix, can you help me please. <!DOCTYPE html> <html> <head> <script type="text/javascript" src="getmapa.js"></script> &...
asked by 30.06.2017 / 01:14
1
answer

Doubt with collation of mysql

I am putting together a part of the page where I will show brief "news" that will be loaded by the administrators of the page. I am using the MySQL database and I have some doubts about the "collation" and the possibility that I can save the com...
asked by 30.06.2017 / 22:42
2
answers

What type of database to use?

If I have a database in MySQL with a user table, and I want to store information inherent to each user, such as their profile image, conversation histories, or simply images or files that this user upload. What database should I use so that...
asked by 29.06.2017 / 11:05
2
answers

How to insert several data at the same time in mysql and php?

I want to insert several values at the same time in a mysq table, I have two INSERT'S but only the first works (formatted), the other is constituted by a for cycle because it is inserted three times but it does not work (orders) this is the code...
asked by 16.06.2017 / 18:48
1
answer

how to fill a jcombobox in java?

I want to fill my jcombobox from my database, but only the first record is filled and not all the others, it should be loaded as soon as the jframe form is opened Here I initialize my method to fill the combobox public class adm_pedidos ext...
asked by 14.06.2017 / 22:35
1
answer

I can not enter mysql in debian

When installing MySql-Workbrench, it has unconfigured MySQL and phpMyAdmin, stopping working. I have tried to install it again and it gives me the following error:    ERROR 2002 (HY000): Can not connect to local MySQL server through socket   ...
asked by 14.06.2017 / 16:39
2
answers

Problem with ORDER BY: DESC

Good, I have the following problem, that I have a social network where people can post things and send messages, the thing is that by doing select of all publications and show them the order by UNIX_TIMESTAMP (data) DESC does not w...
asked by 14.06.2017 / 13:56