Questions tagged as 'mysql'

1
answer

Compare array fields codeigniter

Good evening! I am doing export reports, in my form are sent via $ _POST the fields that the user wants to export, I get and assign to a variable all fields. I need to compare these fields with the fields coming from the database return....
asked by 26.09.2015 / 01:48
1
answer

MySQL syntax error

Good morning, I have an error in my upload system. The error is as follows:    You have an error in your SQL syntax; check the manual that   correspond to your MySQL server version for the right syntax to use   near '', '845941', 'adventure',...
asked by 31.08.2015 / 13:46
1
answer

Update multiple IDs at the same time

How to update multiple records at once with just one click with php / mysql? Example:     
asked by 24.08.2015 / 18:07
2
answers

Inner join join table with several equal IDs

The problem is as follows, I have two tables one of contracts and one of borrowers 1xN and when I do inner join it repeats exactly the amount of columns that I have in borrower but only brings the name of the first one. follows an example...
asked by 14.10.2015 / 21:32
1
answer

Display report of MySQL tables

I have a problem generating a report, in which the site administrator will see the ID and login fields of all registered users, so far, I have this code: <?php require_once('config.php'); $emite = "SELECT ID, login FROM usuari...
asked by 16.10.2015 / 13:01
1
answer

Select Nested MySQL

I'm trying to get the highest value from the smallest of a table, the query I'm trying to execute is as follows: SELECT district FROM (SELECT district, MIN(postal_code) FROM address WHERE postal_code != '' GROUP BY district) WH...
asked by 15.10.2015 / 00:17
1
answer

How do I populate an arraylistType with a result fetched from the mysql database using Hibernate?

On many topics I see a piece of code I can not reproduce: Query query = session.createQuery() I can not create this session object with the createQuery () method as an option. Can someone show me an example of how to populate an ArrayList...
asked by 05.09.2015 / 16:16
1
answer

Read TXT file with PHP and write to mysql

I am developing an application to control the equipment of the company, I can generate a log of the equipment with all the information related to the equipment, however this file is not tabulated, example below a few lines: SET SYS:SYSDESC="SQ...
asked by 04.09.2015 / 20:04
3
answers

Uncaught exception error PDOException with message 'SQLSTATE [HY000]: General error: 2014 [closed]

I have a code that works perfectly on the local server wampserver, it is a query interspersing the results the problem is that when I finish the site and host it I get an error. The code is this: $conn->exec('SET @orderA := 0; SET @order...
asked by 21.08.2015 / 03:04
1
answer

Maximum size of a MySQL column

Good afternoon, everyone! I have a question ... I want to get the maximum size of each column of a table, so I'm using SELECT MAX(LENGTH(nome_coluna_1)), MAX(LENGTH(nome_coluna_2)).... FROM nome_tabela; The problem is that some columns c...
asked by 14.08.2015 / 22:06