Questions tagged as 'mysql'

1
answer

"Uncaught PDOException: could not find driver" error in Wordpress on localhost

I'm trying to put a site in Wordpress in Xampp (localhost) but when I run it, the following error appears: My error: link    Fatal error: Uncaught PDOException: could not find driver in   C: \ xampp \ htdocs \ phdvital \ public_html \ pa...
asked by 11.09.2017 / 22:42
3
answers

Display only one message at the end of an operation within a WHILE

I have a situation. I do a search on a table and from the data returned, I insert into a new table and update the current one. Ex: $busca = $link->prepare("SELECT valor FROM tabela1 WHERE funcionario = ? and confere = 0"); $busca->bind_...
asked by 21.09.2017 / 21:50
1
answer

What is the best practice for making a large table query?

I have a system composed of several tables. One of the tables is called Publications and contains 15 varied fields, 3 of them being the main ones of my doubt: 1. titulo - varchar(100) 2. subtitulo - varchar(200) 3. texto - text In...
asked by 29.08.2017 / 19:51
3
answers

My dropdown does not matter bank options

I have a form with a dropdown , which should have as options the users registered in a table of my database. The connection: <?php $connection = mysqli_connect("localhost", "root", "", "db_formacao"); if (mysqli_connect...
asked by 28.08.2017 / 14:16
2
answers

Separate query per month and sum the results

I have an order database that contains multiple requests for multiple dates, but I need to list a separate report per month and their respective sums up front. Example: ThedatefieldinthetableisasDatedatetime(date_time_order)andtheotherfie...
asked by 20.07.2017 / 20:18
1
answer

Catch all the data with the same id without knowing the id

I have a table in the database with information that has the same ID, as if it were a set, I would like to get all the information with this ID, but I do not have it, and I'm using a LIKE to fetch terms from this set, something like this: SELE...
asked by 22.06.2017 / 02:02
2
answers

List two distinct tables and filter by date MySQL - PHP

My problem is that I need to list values from two distinct tables, and I'm using a filter to add conditions in the query. For example: if(!empty($mes_especifico)) { $sql .= "AND YEAR(d.data_pagamento) = :ano AND MONTH(d.data_pagamento) = :m...
asked by 21.06.2017 / 20:32
2
answers

Insert only the filled line in php

I have this code: <?php $j=0; while($rows_cursos = mysqli_fetch_array($resultado_cursos)) { $tabela1 .= '<tr>'; $tabela1 .= '<td> <input type="text" size="45" name= "NomeUtente[]" id= "NomeUtente" value="'.$rows_curs...
asked by 11.04.2018 / 14:42
2
answers

Set Auto Increment position, always to lowest ID

Well, it's the following I have a MySQL table, where it contains a table designated by users. In this table, it contains a column named ID, where it is AutoIncrement and type INT. What I want to know, if it is possible to do in some config...
asked by 30.03.2017 / 01:22
2
answers

How to do a select between dates [duplicate]

My question is very simple, I want to make a SELECT between dates, of a given table, where status='1' . That is, I have for example: $data1 = 13/01/2017 $data2 = 20/01/2017 I want to make a select of all results between th...
asked by 13.01.2017 / 22:25