Questions tagged as 'codeigniter'

1
answer

Fatal error: Call a member function num_rows () on a non-object

I'm trying to get the total number of rows from a query but I'm giving this error, I already tried to use the row (), rowCount () function and even check if I found any results to return and even though I did not get the solution    Fatal err...
asked by 24.01.2017 / 22:59
2
answers

Use of loop in codeigniter

Hello, how are you? I'm having a big problem in codeigniter that I'm not able to solve, I have a helper where it works as follows function forms($a){ for(i=0;i<=$a;i++){ <input type='text' name='forms_$i'>...
asked by 28.08.2016 / 16:55
2
answers

CodeIgniter - Syntax error with select and where

In a precise project that shows only the active publications on the main page I am using Codeigniter, I have used the following lines of code: Model: $this->db->select('*'); $this->db->from("publicacoes"); $this->db->where('...
asked by 26.11.2018 / 11:01
1
answer

Open modal window according to Customer id

In the view I make a foreach to display the clients, as below: <div class="row"> <div class="col-md-12 col-xs-12"> <div class="table-responsive"> <table class="table table-striped">...
asked by 10.07.2018 / 16:09
1
answer

CodeIngniter counting rows and displaying in View?

I want to count and display a database field. Database: nbkg Table: chamados Model: chamados_model.php <?php class dashboard_model extends CI_Model{ public function lista($chamados) {...
asked by 27.03.2017 / 13:14
3
answers

Validation of filled fields of a form

Today I have a few forms in windows (modal) and some of these fields need to force the user to fill in today I'm doing the following: Form: IftheuserforgetstofillinsomefieldIusethefollowingcodewheremyformvalidatesandifthereisanerroritreturns...
asked by 27.06.2017 / 11:57
1
answer

Insert data into the bank with codeigniter

I need to display and save data in my database but as I'll show below I'm using Joins to display, for example the name of an author using their primary key. For display is working, but when I use my method to insert data into the table it r...
asked by 23.01.2017 / 19:52
2
answers

"Unknown column 'Array' in 'where clause'" - PHP + CodeIgniter

Hello, I have the following tables in the database: data_vaga where it has several fields and one of them is id_vaga, id_academico. sender_date where it has several fields and one is the following id_vaga. When I save a job it has the i...
asked by 30.08.2016 / 18:08
1
answer

FUNCTION INSERT PHP

I'm trying to insert into DB when and it is in the following condition: public function cadastrar_agendamento($dados){ $consulta = $this->db->query(' SELECT cod_lab, cod_data, cod_horario, cod_assento, al_reg, dataagendamento...
asked by 17.10.2016 / 18:49
2
answers

Give Foreach a label in Chartjs / Canvas - CodeIgniter

I have a problem here, which may be simple, I do not know I'm using a graphic frame, where I can put the labels I want so it can be displayed at each bar. Staying like this: Eachitem(January,February,March...correspondstoalabelinthefollowing...
asked by 28.10.2016 / 21:44