Questions tagged as 'mysql'

1
answer

Floating tables in the database model? [closed]

It is assumed that if we are going to use a relational database manager as for mysql examples we should have all the related tables? or can it be the case that we have floating tables that would depend on that?     
asked by 07.08.2016 / 19:07
2
answers

Display a mysql table with JOIN and NULL values

I have a table in mysql base, where are the records of all the teams (it is for a soccer page) I need to pair it with two tables but only counting some values. For example: Base table called "computers", where the other data will be taken i...
asked by 07.12.2016 / 02:53
1
answer

How do I show a value of the BD in a select that is loaded with countries?

I have a select that I charge with the countries, and from mySQL I recover a value. First charge all the select, but then how do I make the select show me the selected country that comes from the bd? It is understood that in the BD store the "pa...
asked by 19.07.2017 / 14:53
1
answer

query in mysql with where

Hi, I'm trying to make the following query: Find those families that have at least 3 children, and with a maximum age of less than 10 years. (all fields requested by the query are in the same table) I have this: >SELECT * FROM familia...
asked by 29.11.2018 / 01:34
1
answer

how to do a SQL query from different tables?

Good morning, I hope you can help me. I need to make the following query: Obtain the full name of the employees, as well as the name of the department, position and salary in which I have worked. I have the first query that is the following:...
asked by 28.11.2018 / 01:57
2
answers

MYSQL query, last record of a table

I have the following two tables User (Email(PK), Nombre, Rol) and Message (Id (Pk), IDSend (FK), IDDest(FK), Mensaje, Status, Fecha) I need to return the Email, the Name, the message and the Status of the last message of each u...
asked by 30.11.2018 / 04:43
2
answers

Object of class Conn could not be converted to string in

The following error is presented to me when designing queries to the database, I enclose the source code: Validations.php: <?php session_start(); if(isset($_SESSION['usuario'])){ header('Location: vistas/home.php'); } if($_SERVER['REQ...
asked by 26.11.2018 / 03:22
2
answers

Show colors taken from a php database

I have a web application, which has a form for registering new users; Each user is assigned a unique color, taken from BD (MySQL) . I have a users table and a table colors, having two registered users, I want to show the color assigned...
asked by 21.12.2018 / 17:38
1
answer

Sum cumulatively in the same MYSQL query

I have the following query: I need to add and subtract the entries and exits of units based on dates, where in the column BALANCE reflects the partial result but I have not achieved it correctly. Why: As seen in the image in the firs...
asked by 19.12.2018 / 16:05
3
answers

keep a different foliate in mysql php when two records are inserted at the same time

I have the following problem: Two or more users on different computers are filling out a form and that form assigns them a sheet. The folio is consulted according to the last one registered in the BD and returns the next folio to be used....
asked by 23.11.2016 / 17:43