I need to create a SELECT that contains only records of an x value onwards. For example, returning only movies with number of copies greater than 5
My Select
router.get('/filmes', (req, res) =>{
execSQLQuery('SELECT IF(copias >...
I need to insert some data into a table, using the following code:
var query = 'INSERT INTO uso (id_usuario, id_tempo) VALUES ((SELECT id FROM usuario WHERE nome='Jose' LIMIT 1), (SELECT id FROM tempo WHERE timestamp=1505530800000 AND nome...
I have a problem with MySQL, I created the following table:
create table pessoas (
cpf int (11),
nome varchar(30) not null,
nascimento date,
endereco varchar(30) not null,
cep int(7),
bairro varchar(20),
cidade varchar(30),
uf char (2),
primar...
I have a database in SQL (banco_sql), where there is the employees table with 4 fields (ID, OFFICIAL, SALARY, DEPARTMENT).
ID FUNCIONARIO SALARIO DEPARTAMENTO
1 Pedro 1400 TI
2 Isab...
Hello, all good? I have a problem in performing data insertion in a MYSQL database. When I type a password in my form, for example: metas123, or any other password, it stores the value 0, instead of the string typed, and I really have no idea wh...
Good afternoon!
How do you make a SELECT that returns the result only for the value filled in form HTML ?
For example, if someone completes the TRAVEL field that returns all values that contain the completed trip. Or if someone c...
Hello, how can I do something similar to an if but per sql?
For example: There is a field in the database named dt_ini with no value so far.
I would like to do: "If dt_ini == '' insert into table ( dt_ini ) values ..."
I would have to que...
I have the following problem: My files are leaving with accentuation problems, my tables use utf-8 as encondig, the html files have the markup for utf-8 and even then the accents do not work:
<html>
<head>
<base href="http...
I search with existing numMec and it appears to me that it does not exist in the database
<?php
if(isset($_POST['search'])){
$searchq = $_POST['search'];
$searchq = preg_replace("#[^0-9]#i","",$searchq);
$query = mysql_query("SELECT * FROM...