Questions tagged as 'mysqli'

1
answer

PDO suppresses columns with equal names

I noticed that using PDO to execute the query below, the results are conflicting with PhpMyadmin and Console do Mysql : SELECT a.*, n.* FROM arquivo AS a INNER JOIN numeracao AS n ON (a.id_numeracao =...
asked by 08.03.2014 / 06:02
1
answer

Get Showing Products from a User

Good! It's the following, I'm developing a website that consists of a user seeing the state of their equipment while it's being repaired. But I'm having trouble viewing a user's product for him. For example: The administrator inserts a pro...
asked by 25.01.2016 / 12:17
1
answer

Using mysqli to count records

I need to do a log count. I used: mysql_num_rows($consulta); How do I do the same thing using mysqli? Because I'm doing it this way: $tabela_usuarios = "SELECT * FROM owner WHERE owner_email='$email' AND password='$password' "; $resul =...
asked by 21.08.2015 / 17:23
1
answer

Do select searching for the 3 highest values

I have a table that has the following data:    id_indication, id_user, lg_client A user can indicate multiple clients (lg_client = 1) , would like a select that searches the 3 users who indicated the most, ie the three id_user that t...
asked by 31.12.2015 / 11:17
2
answers

Error while uploading photo

I tried to apply the instructions to upload photos to the bank with this article . I have just adapted to the MySQLi extension. The connection code below: $conecta = new MySQLi = ("localhost", "root", "", "forum-ti-1"); However, the fol...
asked by 27.05.2015 / 21:12
1
answer

How to save data in Mysql using prepared statments

I am changing the fields to save date in MySQL, from varchar to date , and I was in doubt about the correct way to include date fields in the database using prepared statments . As I use DD / MM / YYYY during the script to...
asked by 28.09.2015 / 07:19
1
answer

Doubt about the error "Strict standards: Only variables should be passed by reference in"

To write some dates in the database in the desired format I'm doing this: mysqli_stmt_bind_param ( $stmt, 's', date("Y-m-d", strtotime($data)) ); Or, to get the current day simply: mysqli_stmt_bind_param...
asked by 22.10.2015 / 19:38
3
answers

Multiple UPDATE from a dynamic field

I'm trying to get the% s of% s that comes from checkboxes selected by user (array), and through these id s, make an update to the table, with the following code: $ocs_imp = $_POST['check_imprime']; $contar = count($ocs_imp); $id = impl...
asked by 16.01.2015 / 03:21
1
answer

Update table field just checked with checkbox php mysql

@Leo Caracciolo worked out the way you did # , but I have another problem: there are students who are enrolled in several courses, ie the student id is the same but the course id in the run_id column is different for each user id, so each time I...
asked by 08.11.2017 / 00:06
2
answers

How do I pass dynamic parameters in a preparedStatment?

I have a function to insert data into the database dynamically. It worked fine when running query directly using only the query() function, so I started to restructure the function to work with preparedStatments , it stopped...
asked by 30.11.2015 / 16:34