Questions tagged as 'mysqli'

1
answer

mysqli_query () does not return false

Starting in PHP, I recently learned OO with PHP and had a problem converting my procedural code to OO. I have an "organ" table (columns: id, name_orgao) with only 1 record. I query through a DAO (I loved this): class OrgaoDao{ private $conexao...
asked by 25.09.2016 / 21:53
0
answers

Querying multiple MySQL data

I'm doing a chat and I have the following table in the database: Iwanttolistthelast5conversationsofauser,butthequeryisverycomplex,I'mtryingtoresolvewithsubqueries,butIdidnotcomeupwithanything,itshouldmeetthefollowingrequirements:Theuserinque...
asked by 02.10.2016 / 03:19
2
answers

Query next mysql record

Opa, In a fetch_assoc query, I need to select the next record after an item CREATE TABLE 'atividade_estudo_andamento_palavra' ( 'atividade_estudo_andamento_palavra_id' int(11) NOT NULL AUTO_INCREMENT, 'atividade_estudo_andamento_palavra...
asked by 30.09.2016 / 17:38
1
answer

CRUD U can not get ID and edit Update

People need a light to unfold a TIMESHEET. I have the following code. <form method="post" action="includes/input.php"> <button type="submit" class="btn btn-primary" onClick="send('login');" value="login" >Default</button&...
asked by 16.09.2016 / 00:45
1
answer

How to pass an array value in bind_param in mysqli? [duplicate]

I'm doing this, but always the error because of the array, does anyone know how to solve this: public function Verificar(string $tabela,string $parametros,array ...$usuario) { $this->Query = $this->Conexao->prepare("SELE...
asked by 01.08.2016 / 20:44
1
answer

Error inserting record into daughter table with PHP

Hello, I have the following tables: | ----- tb_user ---------------------------------------- ----- | id - name - login - password - flag_active - permissao | ------------------------------------------------- --------------- | | ------...
asked by 12.07.2016 / 17:22
2
answers

Select in table records with relation MxN

Hello, I have in my database a table tb_usuario (INT id, VARCHAR name, INT flag_active) and a table tb_regional (INT id, VARCHAR name, VARCHAR login, VARCHAR password) . From the relationship between the two the table tb_regional_user (tb_reg...
asked by 12.07.2016 / 14:53
1
answer

Retrieve values from dynamically generated checkboxes

I have a form that has some checkboxes with names of cities that are generated dynamically by PHP. I would like to know how to get these values and in what type of structure to store them (Array?) And in what kind of data to save in MySQL. These...
asked by 09.07.2016 / 14:30
0
answers

When trying to insert something in the database with mysqli of boolen error

Show this error: Uncaught Error: Call to a member function bind_param() on boolean in /opt/lampp/htdocs/sala/class/Config.class.php:35 In my file it looks like this: public function Cadastrar(string $nick,string $senha,string $status, int...
asked by 01.08.2016 / 03:48
1
answer

Error entering data into DB using mysqli

I'm trying to insert into 2 data tables, but I always have the error of Cannot add or update a child row: a foreign key constraint fails that is to say that it can not insert in the second table, because at first the PK does not yet ex...
asked by 26.06.2016 / 21:32