Questions tagged as 'mysqli'

1
answer

PDOStatement :: execute () error: SQLSTATE [HY093]: Invalid parameter number [closed]

I have the following code, I used another similar one to do an update of the database, but this one now does not work; it gives the following error:   Warning: PDOStatement :: execute (): SQLSTATE [HY093]: Invalid parameter   number: paramete...
asked by 02.06.2015 / 21:24
2
answers

Problems with mysqli_result as array

I'm trying to make the page display the documents sent by the user, but it always returns me the same error    Fatal error: Can not use object of type mysqli_result as array in> C: \ wamp64 \ www \ Project-EscolWeb \ student-query.php on line...
asked by 13.10.2016 / 15:47
1
answer

Error while uploading file to the database

I'm trying to upload a file to the database. Except that instead of sending the file itself, it is sending the temporary location of it. My code looks like this: $arquivo = $_FILES['arquivo']; $name = $arquivo['name']; $file_tmp = $arquivo[...
asked by 03.10.2014 / 19:23
1
answer

Add values to a database by PHP

I'm trying to add values to a database through PHP. I'm using PHPMyAdmin for both databases and also for the site in question. At this moment the code I have is the following, I present my doubts at the end: <html> <head>...
asked by 12.12.2018 / 22:23
3
answers

Help with select in MYSQL [closed]

I would like to know how I do to list the oldest customers for each city, I tried several commands but without success. I would like you to quote automatically. Here are some commands I used, but I did not get the expected result. selec...
asked by 17.12.2018 / 02:53
1
answer

COUNT with conditions and selection without WHERE at the end

In my table I have 3 columns: % auto_default% id(INT) : values are tipo(INT) or 1 2 I need a medium without the id_usuario(INT) at the end to know if there is a specific data of the user, and if ther...
asked by 29.09.2018 / 18:03
1
answer

How to add + x to each record returned in a SELECT [closed]

For example, in a select in the database, 5 records will be returned: SELECT * FROM esc_usuarios WHERE usu_indicador_codigo = '" . $_SESSION['codigo'] . "' AND usu_situacao = 'ativo'" Then I want to assign a value for each record,...
asked by 18.10.2018 / 23:03
1
answer

How to make a condition with mysql number php

Hi I'm doing a virtual bank type in a part has to make the deposit, the user has the money in the portfolio for example. I have 500 reais in my wallet But if I put any value above 500 it will deposit in the bank account and I wanted the us...
asked by 23.07.2018 / 02:13
1
answer

mysqli num_rows expects parameter 1 to be mysqli_result

Hello, I'm a beginner in PHP and MySQL and I'm in need of help. I'm getting the error that is in the question title in my login function: public function login ($login, $senha) { $result = $this->conn->prepare ("SELECT * FROM...
asked by 30.08.2018 / 16:23
1
answer

foreach to insert multiple rows

I am trying to insert into a MySQL table several rows with the user-filled content in an HTML form, when it even does submit. What I need is that when multiple options are selected in the options of a select, several rows are created in the t...
asked by 21.06.2018 / 16:24