Questions tagged as 'mysql'

1
answer

Delete button with mysql / php modal

I'm a beginner and I'm having a problem with a button (delete with modal). When clicking the button, the system should display the modal and if I click "yes", you should delete the registry. I'm keeping my codes on a single page: "details.php...
asked by 03.11.2016 / 12:47
2
answers

Helps to reduce the size of php scripts mysql [closed]

How could I improve the script below, it would be possible to do something with the queries or something, because it does everything I need, but it got a little messy and big, what could I do? <?php include "conexao.php"; if (!isset($_SESSI...
asked by 08.11.2016 / 06:32
1
answer

Error fetching the database

My application is integrated with my bank and it makes several queries, but in one of them is happening something unexpected, because the search is not done. Note that my statement line is simple and correct (it works when I run MySql manuall...
asked by 27.11.2016 / 21:56
1
answer

Select in mysql from this index

I am doing a query in the database and have to return the table from such index. for example: | ind | value | 001 | AAA | 002 | BBB | | 003 | CCC | 004 | DDD | 005 | EEE | | 006 | FFF | | 007 | GGG | 008 | HHH | I would have to ret...
asked by 22.10.2016 / 05:02
2
answers

Search multiple tables at once

Colleagues. I need to search multiple tables (a total of 28) where each table corresponds to a state in Brazil. This search would be from the CEP, which is one of the fields of these tables. Inner Join I do not know if it would be the solutio...
asked by 18.01.2017 / 18:31
1
answer

Error when using PDO: "Call a member function query () on a non-object in ..."

I am trying to make a query in the database, however I get the following error:    Fatal error: Call to a member function query () on a non-object in C: \ wamp \ www \ site-news \ Class \ Publication.class.php on line 37 I created a class...
asked by 04.01.2017 / 14:50
1
answer

mysqli: Could not fetch mysqli_result

I want to save the result of a query in $_SESSION , but when I try to retrieve the query from $_SESSION , the error occurs    "Could not fetch mysqli_result". Note: I use session_start() . Here is the code: Query mysq...
asked by 30.12.2016 / 19:11
1
answer

How to break lines in the output of an Array?

Good afternoon, I have an array in PHP that shows the date the last backup of each store was made, and the information is shown as follows: LOJA01 - Bkp 01 teve o ultimo backup em1: 02-01-2017. LOJA01 - Bkp 02 teve o ultimo backup em3: 30-...
asked by 02.01.2017 / 20:49
2
answers

Table only fills the column title

I wrote the method below: public void setListaCompra() { String sql = "SELECT * FROM\n" + "(\n" + " SELECT \n" + " produtos.id AS id, \n" + "...
asked by 26.09.2016 / 21:08
1
answer

Errors compiling program using MySql resources [closed]

I'm learning how to use MySql , but I had some problems compiling a program in C using MySql . Here are the errors below: gcc: error: Usage:: No such file or directory gcc: error: [OPTIONS]: No such file or directory gcc: error: Options:: No...
asked by 05.09.2016 / 22:53