Questions tagged as 'mysql'

1
answer

PHP / MySQL - Print values relative to tables

In a system I need to print ink cans and each one has its own colors. I did it in a way that works, but it repeats the requests in the database several times. I made two tables (Example): latas ______________ id | nome 1 | uso geral 2 | t...
asked by 13.09.2016 / 16:43
1
answer

Google Charts returning null in mysql query and loop

If I do the query in the database it returns values, already in the charts it is returning null, what am I doing wrong? <?php require("conexao.php"); //chama o arquivo de conexão ao BD include("query_ti.php"); ini_set('display_errors', 0);...
asked by 09.09.2016 / 22:31
1
answer

View of two tables

I have two tables, TABLE_1 and TABLE_2 and I want to create a view with some fields of both where the id_event (existing in both) is equal. CREATE TABLE table_1 ( id INT, id_event INT, col1_t1 varchar(255), ...); CREATE TABLE...
asked by 02.09.2016 / 15:54
1
answer

Export and Import Mysql Table [closed]

I have a Wordpress plugin, which can be used on many blogs with the same configuration. I have two tables in it: wp_table_um and wptable_2 How can I create a button to export these tables and a field to import in case of a new installation...
asked by 02.08.2016 / 19:15
2
answers

Save the select result to a variable and use this variable to fill in the input that will then be used to do an UPDATE on the same table

I'm trying to retrieve data from a table inside an input where the user can be updated and save to the same table through UPDATE. I was able to do the UPDATE, but I edit the data by input and send, it saves in the right bank, but when I refresh...
asked by 02.08.2016 / 15:46
1
answer

Problem with select UNION ALL mysql

I mounted the following select in MYSQL: SELECT id_produto, SUM(qtd) as qtd FROM ( SELECT id, id_produto, qtd...
asked by 09.09.2016 / 18:33
2
answers

Update balance with revenue and expense

I have an application, where there is an option to register an ACCOUNT with initial balance equal to zero and two options to register REVENUE and EXPENSES. When registering a REVENUE, the account balance updates according to the value recorde...
asked by 14.09.2016 / 16:22
1
answer

Include data in Json beyond what comes via Mysql

I'm building an API in PHP / Mysql that will feed a hybrid APP, also under construction, via Ionic. The data traffic is via Json. I'm a newcomer to Ionic, Angular, JS, and Json ... Reasonable in PHP and Mysql. I mean ... heeeeelllllllp please...
asked by 14.09.2016 / 00:20
2
answers

Rails and MySQL - Data Types

I recently started using Ruby on Rails for a project, and I have questions about scaffolding and other DB features in Rails. Here is a topic explaining data types in Active Record Migration link How can I use other types of data present...
asked by 19.07.2016 / 20:15
2
answers

Search system error with php

I'm creating a search system for users on my site. However I am facing the following error: ThisisthecodeI'musing: <body> <h2>Resultados da tua pesquisa</h2><br /> <?php $query = $_GET['query']; $m...
asked by 20.07.2016 / 17:51