Questions tagged as 'mysqli'

1
answer

Creating event in Mysql

I would like to create an event based on 2 situations. I have a table and column a situation_id with values    [1 - free], [2 - busy], [3 - Not available]; And another modified column - it generates the date of modification of the regi...
asked by 16.06.2017 / 15:35
0
answers

Update using Json HTML and PHP

Good morning I need to update the data that is in my index TheyareloadedasfollowsJavaScript$("document").ready(function () { function gerarFunctionario(obj) { return '<div class="col-md-4 col-sm-4 col-xs-12 profile_details">' +...
asked by 08.06.2017 / 18:19
0
answers

How to define a minimum time interval between inserts in the database?

I have a submission form, where it adds comments to the database and shows them on the page. The problem is that I want to set the form so that people can only do submissions every 10 minutes. That is, a user can only post a second comment 10...
asked by 06.05.2017 / 15:18
1
answer

how can I use group by next to order by

How to use GROUP BY along with ORDER BY ? I need to sort my tabela form ASC but I can not use GROUP BY how should I do to use the two together? code snippet: mysqli_query($conn, "SELECT nome_fotos, img, id_...
asked by 04.05.2017 / 06:43
2
answers

Edit selected record [closed]

I display records from the database in TDs, each record has an edit button that opens the edit screen, but I do not know how I can display the data in the record I clicked to edit and save.     
asked by 29.03.2017 / 15:05
1
answer

Send values to the database

They can help me to send the field values to the database. For the viewer, I'm using the following code: Page Code: <?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> <div class="content-wrapp...
asked by 19.12.2016 / 16:08
2
answers

Last ID lastInsertId

Good afternoon Personal I'm trying to get the ID that was entered by my class but without success. The examples I found none worked. If anyone can help thank you. public function insert_orcamento($numero, $cod_cliente) { $sql = "INSER...
asked by 25.10.2016 / 21:29
0
answers

MySQL 2002 error: Can not connect to local MySQL server through socket

I'm just setting up a website for hosting and I've already set up mysqli connections, but I'm giving this error here when trying to run the site:    Warning: mysqli :: mysqli (): (HY000 / 2002): Can not connect to local MySQL server through s...
asked by 11.10.2016 / 23:04
0
answers

mysqli_query () inside mysqli_fetch_assoc () dispense with the use of mysqli_free_result?

With the new MySQL class, mysqli , it became necessary to always worry about using mysqli_free_result() after mysqli_query() with SELECT to free memory, however I often use mysqli_query() % within mysqli_fetc...
asked by 14.09.2016 / 13:29
2
answers

How to display data from a specific row in a database without knowing which row it is?

Hello. I have while which prints on the screen a list of all the company names in my database: $sql = "SELECT 'nomep' FROM 'cadastropn' WHERE 'cidade' = '$cidade'"; $result = mysqli_query($mysqli, $sql); while($linha = $...
asked by 07.09.2016 / 22:38