Questions tagged as 'mysql'

1
answer

Error when trying to list objects that are in the database when using Foreach ();

I am making this code to capture the elements of a table in my database but when I run the foreach code I get the error and I do not know what to do Data fetch function: function listaUniformes($conexao) { $uniformes = array(); $query = "...
asked by 25.07.2017 / 19:48
1
answer

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or 'identifier (T_STRING) or variable (T_VARIABLE) or

I can not figure out where the error is. I believe it is in the face, but I can not find it! $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome, email, senha, contrata, trabalha, status) VALUE ( $_POST['nome'],...
asked by 23.07.2017 / 04:50
2
answers

Grouping a set of measures in PHP

I have a problem to join a set of values. I have a wood marking system. I feed the database with the length x width of the wood Id, order_id, length, width, date Registros: 1, 3, 320, 20, 05-25-2017 2, 3, 320, 25, 05-25-2017 3, 3, 310...
asked by 30.05.2017 / 22:18
2
answers

Launch Exception with error # 1452 - Can not add or update child row: a foreign key constraint fails

I'm developing an application where the user types some information, two of them are CodeMotorist and CodeVeiculo. This is an excerpt from my code: try { $database->query($sql); $_SESSION['message'] = 'Registro cadastrad...
asked by 15.06.2017 / 06:44
3
answers

How to print in HTML using PHP a list of ul type items with 3 different types?

I have a table in MySQL called Plans with the fields: Whatisatableofsubscriptionplansforawebsite,thefinaltemplateisasshowninthefollowingimage: Where:name=PlanNameop1=Firstadvantageoftheplanop2=Secondadvantageoftheplanop3=Thirdplanadvantagepr...
asked by 10.06.2017 / 01:41
2
answers

Query sql codeigniter

I have a table with dates and I would like to create a query that returns records with dates before the current day but I could not mount this query; below is my code and BD image: function get_late_events($sort = 'idevento', $order = 'asc', $...
asked by 01.07.2017 / 17:14
1
answer

Time Count Mysql

I have a table where it counts the client connections time in freeradios , every time the client enters or exits the network it registers. I would like your help to know how much time each user navigated per day differently in MySQL. EX...
asked by 11.07.2017 / 02:10
1
answer

Specific cell change in MySQL

I'm trying to change a specific cell in MySQL using a form in PHP, but I can not do that and no error is shown so I can try to fix it, how can I fix the problem?    Logic <?php require("conecta.php"); $novoTituloDisciplina = $_POST["no...
asked by 10.07.2017 / 18:21
1
answer

foreign key problems when selecting items

Well, I'm trying to select all items from two separate listings, but without success, I'm using:    Query select t*, d.id as id_discvinculada from textos as t join disciplinas as d on t.id_discvinculada = d.id    Function function li...
asked by 10.07.2017 / 21:40
2
answers

Problems in insert using php

I would like to ask a question, I am trying to make a simple insert with php and mysql but I am giving 3 errors, which I have already discovered are the connection, only I give the include in the connection (which is an external file) and even t...
asked by 11.07.2017 / 17:05