I'm making a system for a college and one of the subsystems I'm building is the student newsletter. I put it to when creating a new discipline in the table "discipline" this discipline is added to the "notes" table with a record for each id of e...
How do I perform a query, by index, where column data is of type JSON?
For example:
I want to get all the data where the voltage is equal to 220:
table material
id | descricao | extra
2 | Altus | {"tensao": "220", "comuni...
How do I make a table with a compound key, but I can not repeat the combination of values.
I want to store FRIENDS , using a syntax similar to this:
tb_amizades
id_usuario_um
id_usuario_dois
SELECT * FROM tb_amizades
WHERE id_...
I'm trying to run a query in Laravel , the terminal works perfectly, but when I enter in Laravel , it returns me empty, eg:
Query:
SELECT
MAX(positions.id),
devices.name,
positions.deviceid,
positions.ser...
I have a login system that, if the user is an administrator, will be redirected to one page and if it is common, for another.
The table:
To do this, I have a column in the table that stores active call users, where 0 is a regular user an...
testController.php
$jogos = DB::select("select * from jogo where id_u ='$id_u'");
This is the code I want to page in View using blade
jogo.blade.php
{!! $jogos->links() !!}
$jogos = DB::select("select * from j...
I have a problem in the query to generate a report. I made a JOIN of the ordering table (which will get the report) with the table of customers and products. Until then everything worked, but he hardly shows all the requests, only shows the firs...
I have a huge sql query:
select
l.no_cidadao,
extract(year from l.dt_cad_individual) ano,
extract(month from l.dt_cad_individual) mes,
date_part('year',age(now(), l.dt_cad_individual)) diferenca
from
tb_unidade_saude p,
tb_cds_cidadao_resposta...
Is there a way to censor and replace a MySQL registered word with a procedure or trigger for example? The word in the case would be Flash House and need to be replaced by Old School .
I have two tables in my system, and I need to do a two-column count on the tables. I currently do through a VIEW as follows:
CREATE VIEW totais AS
(SELECT (SELECT COUNT(publications.id) FROM publications) AS total1,
(SELECT COUNT(deejays.id) F...