Questions tagged as 'mysqli'

1
answer

PHP MySQLi Insert field checkbox int

I'm trying to do an INSERT, but I'm not sure how to get checkbox fields. THE TABLES ARE CREATED SO:    works tinyint (1)       contract tinyint (1) Using php 7. $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenom...
asked by 23.07.2017 / 02:03
0
answers

balance insertion in db only after confirmation

I'm making a spending / revenue control system, and I want to know how to make the revenue or expense amounts add up to the balance just after the payment confirmation. Ex: register a light bill to pay in the amount of $ 100.00 in a week from no...
asked by 29.07.2017 / 18:46
1
answer

Syntax Error mysql

I am making a page to list the products that I have in my database, but when loading the page I get this error that I can not solve:    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdo...
asked by 13.07.2017 / 16:46
1
answer

Doubt PHP Json Array

In the query below $id_candidato = 1; $id_vaga = 2; $sql = $mysqli->query("SELECT * FROM candidatos WHERE id_vaga = '".$id_vaga."' AND id_candidato = '".$id_candidato."'"); if($sql->num_rows > 0){ while($row = $sql->fetch_ar...
asked by 30.06.2017 / 22:03
1
answer

PHP error displaying search result with select [duplicate]

Error while selecting data from the database. $rs = $conexao->query("SELECT FROM cadastro WHERE ID_Cliente = '83'"); $row = $rs->fetch_assoc(); echo $row['nome'];    Fatal error: Uncaught fetch_assoc ()   on boolean in     
asked by 23.07.2017 / 23:46
1
answer

Variable not defined in SQL query for PHP

I'm trying to send a query with the information of a table in MySQL to an array in PHP, but I'm encountering the following error when I try to print an array position:    "Notice: Undefined variable: array in C: \ xampp \ htdocs \ Domiritmo...
asked by 20.06.2017 / 18:10
0
answers

Recover Data from Mysql

I uninstalled mysql, did not back up the database, but backed up the files: ibdata1, ib_logfile0, and ib_logfile1. The ibdata1 file has 17GB, in my.cnf innodb_file_per_table = 0. How do I recover this data? Is there any software or procedu...
asked by 20.06.2017 / 15:09
1
answer

Combobox Ajax PHP Returns nothing

I can not return anything .. when I test it instead of the city field and I delete it it returns but with the name of the city it does not return do you have data limit for a CMB? $(document).ready(function() { $('#carrEst').change(functio...
asked by 06.06.2017 / 20:28
0
answers

Find a record using the value of a cookie

I can not find a value in the database by a select by reference to a variable coming from a cookie : $query = "SELECT * FROM carrinho WHERE dono = '$dono'"; However, if you search using the variable text, $query = "SELECT * FROM c...
asked by 01.06.2017 / 11:20
0
answers

Upload multiple files in the same form and write name to bank

I have a registration form with two file input. One called file (one image) and another called file_download (a pdf). In my table I have a column [image] and another [downloads], which record the filename and its extension, to be used in v...
asked by 29.05.2017 / 18:41