Questions tagged as 'mysql'

0
answers

How to do sum with php or SQL?

Hello I want to sum the total values of the result of a query in PDO. However, when executing the command the following message appears in the console:    Object of class PDOStatement could not be converted to int in /Applications/MAMP/ht...
asked by 26.12.2017 / 19:17
0
answers

How do I transform mysql into pdo?

I have this function in mysql. public function get_logst(){ $this->connect_database(DAT5); $querygetl = mysql_query("select HeroName, ObjIdx from ObjLog where LogType = '5' and LogSubType = '2' and DataType = '2' o...
asked by 25.12.2017 / 15:02
0
answers

background-image does not change in CSS file on server

I have a bakckground in a CSS file that works fine in the browser, but when I put it on the WAMP server changes in CSS do not happen. Can anyone help me? In the Index <link href="estilo.css" rel="stylesheet" type="text/css">...
asked by 24.12.2017 / 03:31
0
answers

Sum of hours obtained through a query in mysql

SELECT TIMEDIFF( atendimento_ticket.close_atendimento, atendimento_ticket.open_atendimento ) AS duracao FROM atendimento_ticket WHERE id_tec = '$id_tec'     
asked by 27.12.2017 / 20:53
1
answer

Return query result with node

When I do a select in my MYSQL , I get the answer and I can display this for the user, but the problem is that this is not enough, just get the result and display it, I need to, for example, check if a given id has data in a table, and if it do...
asked by 20.12.2017 / 15:11
2
answers

Generate random name in MySQL - Stored Procedure

Good evening, is there any way to generate random names with stored procedures in MySQL? I have the following table:    ALUNO (id: int [PK], name (varchar (100)), age: int, Cr (float)) I need this table with 10mil entries popular. To gene...
asked by 20.05.2016 / 03:23
0
answers

Warning: mysqli_num_rows () expects parameter 1 to be mysqli_result, [duplicate]

I just uploaded my application to do a test on the server, sq always gives the error the following error Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/storage/5/71/81/cliente47/public_html/admin/f...
asked by 20.12.2017 / 15:19
1
answer

Select the value of a field depending on a date

I have a table with the fields DT_FIMCALCULO, VL_DEPREREVVIDAUTILACUMULADA and CD_SEQUENCIALBEM. And for each CD_SEQUENCIALBEM I have several DT_FIMCALCULO each with a different VL_DEPREREVVIDAUTILACUMULADA. I want to select the VL_DEPREREVVI...
asked by 19.12.2017 / 13:19
1
answer

Hide two div from form in php

This is the code you had: <?php $servername = "xxx.xxx.x.xx"; $username = "xxxxxx"; $password = "xxxxxxxx"; $dbname = "xxxxxxxxx"; $conn = new mysqli($servername, $username, $password, $dbname); $conn->set_charset('utf8'); $data =...
asked by 04.01.2018 / 01:46
1
answer

Fill SELECT via form (PHP)

I have the following code: <?php include("conexao.php"); $sql = mysql_query("SELECT COUNT(*) FROM escola e WHERE coordenador IN (SELECT ec.coordenador FROM escola_coordenador ec WHERE ec.coordenador = '1') A...
asked by 21.12.2017 / 19:04