Questions tagged as 'mysqli'

1
answer

Function in JavaScript triggered after clicking div and saving data in the database

I would like to know if you have a javascript function after clicking and dragging a div (better still: after "drop" the div). I want to make a code so that every time I move the div to a table an UPDATE happens (but I can not imagine how). &l...
asked by 10.12.2017 / 04:26
1
answer

html form for mysql database does not record

I'm a beginner in PHP, and since I'm already full of doubts and looking to learn some techniques and so on, I'm using a form template that I want to play in the database, it will not work when I click in send, says that it was successful but doe...
asked by 13.11.2017 / 01:26
2
answers

Conditions in SQL

Hello, I have a question in SQL. In the company's system there are several products registered, and these products have different sales unit, ie some are sold by Package, Box, Unit and etc ... Every product is sold for UNIT = 1, but there are pr...
asked by 13.12.2017 / 00:52
2
answers

Result of mysqli_fetch array different than the one executed in phpmyadmin

I have the following php code that does a query to the database and returns a vector with the data. public function executeSelect($query){ $resultado_id = mysqli_query($this->objetoConexao, $query); if($resultado_...
asked by 07.11.2017 / 20:44
1
answer

Permission in PHP

I am limiting the amount of a user's posts in a service so I created the function: function limite($conexao, $id) { $query = "select cont_post from usuarios where id={$id}"; return mysqli_fetch_assoc($query); } and in the regis...
asked by 02.10.2017 / 14:23
1
answer

A logic in php

I am creating a system and I want to make sure that my user can only do five posts in the database, that is, in the site. What logic would I use to make this kind of permission? Thankful.     
asked by 30.09.2017 / 14:51
2
answers

Call to a member function fetch_assoc () on a non-object

I used MySQL and PHP in wampserver, now coma last version it uses MySQLi I'm having problems with the following command:          // Executa uma consulta que pega cinco notícias $sql = "SELECT * FROM 'usuarios'"; $query = $mysqli->query($sq...
asked by 29.02.2016 / 20:21
1
answer

Delete a row in DB

I'm having trouble with a small code with delete button. I've tried it in some ways but I have not been able to make the button with $deletar do the delete function. Following code shows each slide and wanted to delete button. <?p...
asked by 20.07.2017 / 13:46
1
answer

Error in insert MSQLI [closed]

I am changing from mysql_ to mysqli, everything works (update and delete) more in the insert does not save .... where is the error? insert file: include("config/con_mysqli.php"); $sigla = $_REQUEST['sigla']; $nome...
asked by 19.07.2017 / 14:22
0
answers

How to add variable in the query as a column? [closed]

How do I add the $pesq variable as the column of a query (not search) query? $pesq = mysqli_real_escape_string($dbcon , $_POST['pesq']); $pesquisa = mysqli_real_escape_string($dbcon , $_POST['pesquisa']); $sql = "SELECT * FROM tbcliente...
asked by 06.07.2017 / 17:44