I have a search system where I search the users by filtering by: name, age and email. If I filter by name and age and email, everything happens fine, but if I filter only by age, for example, nothing is returned even though I try to bank the cor...
I have a table of files, and there is a field called "document_type", which is filled with 1 or when it is not filled becomes NULL, the problem is that when I give SELECT and I use the comparator to return all results with type_document o...
I have the task of refactoring a database and would like to know if VIEWs are feasible for the task.
My strategy is to create a VIEW by imitating the new structure of the supposed table, at least the name of the table (name of V...
I'm normalizing a table here and found that there are duplicate rows.
The way I chose to clean these lines is through:
CREATE TABLE tabela_nova AS (
SELECT DISTINCT * FROM tabela_antiga
);
The problem this way is that it is very slo...
How do I get data from a function, in case I want to make a foreach of an sql query that is in a function:
index.php
<?php
require_once "funcs/functions.php";
$userdata = get_user_data();
foreach ($userdata as $d) {
$name...
I'm doing a page in html with the checkboxes to insert into string form inside a table row, but if I do not mark all the options it gives an error (but inserts into the bank), how do I get rid of this error if in case I choose only one value fro...
In this case the Mysql database did not appear in the Report Viewer list after I managed to install Mysql for Visual Studio 1.27 in the case at the end of the process of linking the table with the database with the following error:
Failed to...
I have a query on a system where the user selects the month and the corresponding records are shown on the same page. I want to print the result of the query but as the form sends via GET:
<form action="" method="get" id='form-contato' clas...
I'm facing a strange error with accentuation.
I set my bank, table and structure to UTF-8.
I use:
header('Content-Type: text/html; charset=utf-8');
mysql_query("SET NAMES 'utf8'");
mysql_query('SET character_set_connection=utf8');
mysql_query(...