Questions tagged as 'mysqli'

3
answers

MySQLi + num_rows after a table query

This is to be a login system with access levels that I am trying to do, but this is giving an error. What am I missing? I've tried everything and nothing. I have already looked at the PHP documentation and nothing. I wanted it to be obj...
asked by 11.12.2017 / 13:58
1
answer

Script to remove readonly

I have a user registration system and a page where I show all registered users. I display 8 users per page - each user has the option to click on an anchor Info that details the user. In these details there is an option to reset the passwor...
asked by 05.12.2017 / 13:21
1
answer

Pass a php array in a query and return multiple results [closed]

I want to pass a POST dynamic array of type: array(2) { [0]=> string(1) "1" [1]=> string(1) "3" } For an SQL query that returns multiple results depending on the string values in the array Select nome, count(avaliacao) FROM tabela W...
asked by 27.09.2017 / 10:49
1
answer

Fatal error: Uncaught Error: Call to a member function query () on null in

My class code Users <?php class Usuarios { function listar() { require_once 'controller/conexao.php'; $sql = "SELECT * FROM usuarios"; $usuarios = $mysqli->query($sql); whi...
asked by 11.08.2017 / 19:17
2
answers

GetSQLValueString / mysqli_real_escape_string / Notice: Undefined variable: mysqli

I'm trying to convert a function to Mysqli, for use with PHP7.1. I'm having difficulty with mysqli_real_escape_string , and mysqli_escape_string . Error:    Notice: Undefined variable: mysqli in   config.php on line 16       W...
asked by 15.06.2017 / 19:00
1
answer

Doubts about JPQL

I honestly have some difficulty with BD, and I need a JPQL that returns only one record. I have an Entity Price and an Entity Product. I need to bring the last price registered by the user. I put a date and ID, I imagine it could be the last ID...
asked by 19.08.2017 / 01:03
1
answer

Line chart being populated only with last record only in while / php

   Code: <!doctype html> <html> <head> <title>Line Chart</title> <script src="dist/Chart.bundle.js"></script> <script src="utils.js"></script> <style> canvas{...
asked by 15.05.2017 / 16:47
1
answer

Make a START TRANSACTION not reserve the ID of the tables involved, in case of failure in the insert

Hello developer friends, I set up a transaction script to insert values into 2 different tables, I put a or die at the end of each INSERT so that the data insertion does not occur in the second table , if an error occurs when inserting th...
asked by 30.05.2017 / 17:46
3
answers

How can I pass php data to javascript in this case?

I need to pass the latitude and longitude data of the addresses that are within the 25km radius to the javascript function that creates the map, follow the code I have made so far (Yes, I am a beginner): <script type="text/javascript"> /...
asked by 24.03.2017 / 17:42
1
answer

Which method to use to checkbox a search result to the DB made in ajax?

I need to checkboxes for a forms editing page, the values are saved in a table where the checkboxes that have been marked in the register have been stored, however I do not know how to pull those results and leave the same fields edit page check...
asked by 20.12.2016 / 06:20