Questions tagged as 'mysqli'

1
answer

How to update my MySQL code for MySQLi?

I have codes that use mysql and need to update to mysqli . I need to make two changes, these being the .php pages that insert the data into the database table and data and also the pages that display the data. How to pr...
asked by 22.01.2015 / 15:24
3
answers

How to convert a MySQL connection to MySQL? [duplicate]

I decided to listen to some users to make the conversion but I need your help because I have done a lot of research and nothing works. The first file is: <?php include_once("/pasta/connectserver.php"); $table = "rjpsync_tag, rjpsync_i...
asked by 17.09.2014 / 13:47
2
answers

Smart query with MySQL

I'm trying to make a more "smart" query in my DB, My question is how? I have a query : SELECT * from publicacao where titulo like '%$busca%'; and in my DB there are several publishing titles, for example: Farmácia Pharmácia Pharmacia...
asked by 22.11.2016 / 19:22
9
answers

Search via ajax during typing in input text (autocomplete)

I made a search using ajax that when clicking a button triggers a request with the searched term and returns with data that fills combobox html ( select ). So far so good. However, I found it interesting to change this behavi...
asked by 02.01.2017 / 17:39
1
answer

Select with prepared statements MySQLi

//// The connection is of type MySqli was passed by the constructor method and assigned the variable $ db; public function getById($id) { $query = $this -> db -> prepare("SELECT * FROM tabela WHERE id = ?"); $query -> bin...
asked by 18.10.2015 / 00:44
2
answers

What is the right way to connect to the MySQLi database

I have a question that has brought me various incompatibilities. With the evolution of PHP and Mysql, more recent versions have appeared, this way the Mysqli. This is where my problem resides, I would like to know which is the correct way to con...
asked by 23.09.2014 / 20:29
1
answer

Prepared statements with MySQLi waits data entry validation?

I was studying here about security in PHP & MySQL, and I had a question: If I'm using prepared statments , is it still necessary to validate data entry? For example, I have a field in the form: <input type='text' name='campo'>...
asked by 24.09.2015 / 09:11
1
answer

Loop overload with foreach use [closed]

Hello I'm having a serious problem at least and what the hosting company aqual this my site is claiming that my code below is overloading queries or doing several loops, and I do not know what else I can do. / p> Is there any way to unify or r...
asked by 13.11.2015 / 17:08
1
answer

PHP - Make 3 INSERT on different tables with relationship between them

I would like your endorsement. I need to do 3 INSERT at once. But I also need to get the last ID of each table to do the relationship of the tables. Is this correct, to do this? if($_GET['operacao'] == 'addPrimeiroCadastro'){...
asked by 18.12.2015 / 02:59
1
answer

Mysqli bind with an array of values

I have a code in PDO and I need to convert this code to mysqli, at this moment I have something like that: $sql = "SELECT * from tabela where nome = ? AND idade = ? AND outro = ?"; $stmt = $core->conn->prepare($sql); $bindArray = array...
asked by 04.12.2015 / 12:56