Questions tagged as 'mysql'

1
answer

Help with INNER JOINS

I'm having a problem with INNER JOIN. When I do a search for a certain sale, it brings me all sales related to the customer code, since it is the field "coder" that associates the 03 tables (Customer, Sale and Item Sales), besides taking only...
asked by 23.12.2015 / 11:59
2
answers

how to select only 1 record of each id

After doing an inner join between the user (1) and image (N) tables, the following table is returned (the id refers to the user id and the file_name to the image file): | id | filename | 12 | img1.png | 12 | img2.png | 13 | img3.png...
asked by 06.11.2015 / 18:24
1
answer

Mysql Insert, Auto Insert?

$insert = mysql_query ( "INSERT INTO analise VALUES ( $analise_hora )" ) ; I am trying to insert this data with this function automatically when the user enters the page, but is not being inserted, my time variable is right I gave an echo to t...
asked by 18.05.2015 / 18:18
3
answers

Search for value corresponding to weight

I have a table with values, where each value is according to weight (kg).    Up to 3kg = $ 20.00       Up to 5kg = $ 25.00       Up to 10kg = $ 28.00 SELECT estado, kg, valorCap, valorExcedCap, valorAloremCap, prazoCap FROM transporta...
asked by 14.05.2015 / 21:49
2
answers

MySQL Due Date

I have a register where I store the product registration date. However I need to exclude these products after 5 days registered in the database. I tried to use PHP with the following code: $dataExcluir = mktime(null,null,null,date('m'),...
asked by 03.06.2015 / 20:43
1
answer

Search by dates

I have a screen and on this screen I have a TextField that is populated by a date in the format dd/mm/yyyy and then I convert that date to yyyy-mm-dd which is the format of java.sql.date until there is quiet, but now I am no...
asked by 29.05.2015 / 21:12
2
answers

SELECT with keyword search

How to make a SELECT with specific fields and using LIKE %% in the same statement? something like: SELECT TABLE_A.COLUMN1, TABLE_A.COLUMN2 FROM TABLE_A WHERE COLUMN2 LIKE 'A%' Home already tried this but does not return any...
asked by 19.06.2015 / 17:50
1
answer

Connect MySQL Workbench to Hostinger Server

Several times I tried to connect the MySQL Workbench to the database of my hosted site hostinger.com.br > but it always gives error. As I understand the access data I am passing are valid, why are the same used to connect the application...
asked by 15.06.2015 / 13:10
1
answer

How to do a string concatenation with values from a database?

I want to concatenate different record values, for example, I have the table below: | id | value | 1 | value1 | | 2 | value2 | | 3 | value3 | To show the following result: value1, value2, value3 I'm using PHP + MySQL.     
asked by 10.10.2015 / 05:21
2
answers

Why does not Update?

Whydonotyouupdate?...Noerrornonesodonotupdate//Prepraligacaophpmysql$stm=$pdo->prepare('SELECT*FROMsol_camisetaWHEREcod_nome_aluno=:id');//Atribuioparamentroao$_GET['id']queéoidqueestanaurlecolocaelenoprepareacima$stm->bindValue(':id',$_...
asked by 13.10.2015 / 01:40