Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: why is this code failing?
Post: RE: why is this code failing?

As error says it is a SYNTAX error. Remove quote character before $this
763 Views
6 Replies
07-01-2020, 05:04 AM
neuron
    Thread: CI3, active record contain $offset,$limit
Post: RE: CI3, active record contain $offset,$limit

`$this->db->select('*') ->from('employee e') ->group_start() //this is not necessary, just added in case you will need in future. it will wrap query like statements in parentheses. there is also or_gr...
447 Views
1 Replies
06-29-2020, 11:28 AM
neuron
    Thread: how to get logged_in session status in native php
Post: RE: how to get logged_in session status in native ...

Hi, This is the code I used in some of my project: update your CI index.php: PHP Code: -- //$system_path = 'system'; $system_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'system'; //$applicati...
743 Views
2 Replies
06-15-2020, 08:00 AM
neuron
    Thread: Cookies Misusing the Recommended “sameSite“ Attribute
Post: RE: Cookies Misusing the Recommended “sameSite“ At...

As far as I know it is not CI related issue. I similar issue in my website (CI v3). I use some embedded charts such as Google Trends which causes this issue because it does requests to another domain....
8,335 Views
4 Replies
05-15-2020, 02:15 AM
neuron
    Thread: Delete with Join or Where_in not working
Post: RE: Delete with Join or Where_in not working

1. You should do inner join in this case instead of left join (unless $profile_id can be null). 2. In MySQL if you specifying alias for table name you should use alias in delete statement not a table ...
3,536 Views
6 Replies
05-05-2020, 09:35 AM
neuron
    Thread: Transaction
Post: RE: Transaction

Error is not CI related, it is a general PHP error. Code: -- function control_record_of_user($id_record,$user_id){     $device = $this->get_Device($id_record) ;//get record //here ...
1,254 Views
2 Replies
04-26-2020, 09:52 AM
neuron
    Thread: Deletes are not allowed unless they contain a "where" or "like" clause.
Post: RE: Deletes are not allowed unless they contain a ...

I am sorry :), I don't why I did not have look to your code, before answering. I never did delete with using QB, so I am not sure your code produces the right SQL code.  try running Code: -- echo ...
2,425 Views
5 Replies
03-13-2020, 06:53 AM
neuron
    Thread: Deletes are not allowed unless they contain a "where" or "like" clause.
Post: RE: Deletes are not allowed unless they contain a ...

I see it is hard coded in the system QB, you can either implement your custom QB and override delete method or implement your own method,  or you can add dummy where $this->db->where('1=1', NULL, FAL...
2,425 Views
5 Replies
03-13-2020, 06:09 AM
neuron
    Thread: csrf error
Post: RE: csrf error

pippuccio76 Wrote: (12-26-2019, 04:01 AM) -- The action you have requested is not allowed. -- The errors comes from system/libraries/Security.php, you can find it there if you search this error mes...
1,525 Views
2 Replies
12-26-2019, 05:22 AM
neuron
    Thread: Halt execution on any error
Post: Halt execution on any error

Hi, I want to stop execution, whenever error occurs. Currently, for example, I have a variable undefined error, but script continues running after this line. Thanks in advance.
877 Views
1 Replies
09-03-2019, 06:15 AM
neuron
    Thread: creating a form_validators for dates
Post: RE: creating a form_validators for dates

You can extend CI's Form_validation  library and write your own method to validate dates https://www.codeigniter.com/user_guide/general/creating_libraries.html
1,228 Views
2 Replies
07-09-2019, 11:54 PM
neuron
    Thread: How to get data from 2 related tables in the same controller?
Post: RE: How to get data from 2 related tables in the s...

PHP Code: -- $this->db->select('d.*, o.*') ->from('departments d') ->join('occupations o', 'o.department_id = d.department_id', 'LEFT') -- Simple join it is all you have to do, and you should l...
1,904 Views
3 Replies
07-09-2019, 11:50 PM
neuron
    Thread: ->result() not showing all rows/data
Post: RE: ->result() not showing all rows/data

[quote pid='365920' dateline='1562724737'] PHP Code: -- foreach ($query as $value) { $this->db->where('category_lists_id', $value->category_lists_id); $querys = $this->db->get('cate...
1,504 Views
3 Replies
07-09-2019, 11:34 PM
neuron
    Thread: Anchor setup wih a php echo
Post: RE: Anchor setup wih a php echo

You don't have to use CI's anchor function.  Personally I don't use it. If you want to use it:  PHP Code: -- echo anchor('news/local/123?id=' . , 'My News', array( 'title' => 'The best news!', 'cla...
2,614 Views
4 Replies
07-08-2019, 01:35 AM
neuron
    Thread: query problem
Post: RE: query problem

[quote pid='365734' dateline='1562061900'] here's the error Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'admin_codeignite.fb_usr.id_fb_us' which is not f...
4,109 Views
9 Replies
07-04-2019, 08:20 AM
neuron
    Thread: Help- Session on Ajax
Post: RE: Help- Session on Ajax

Once I was given a cheap shared hosting, where customer asked me to deploy website. I got session errors in this hosting. I created ticket, then they solved it. I mean that this error might me...
1,513 Views
2 Replies
07-02-2019, 11:12 PM
neuron
    Thread: i need to know the 2 kind of forms , which one is More functional ?
Post: RE: i need to know the 2 kind of forms , which one...

use form_open function mainly for the reason that has CSRF protection if you ever will need it. https://www.codeigniter.com/user_guide/libraries/security.html?highlight=csrf#id2 if in future y...
1,242 Views
2 Replies
07-01-2019, 11:19 PM
neuron
    Thread: How to fix a Num_row error
Post: RE: How to fix a Num_row error

also remove semicolon: if($result->num_rows() > 0);{
8,996 Views
12 Replies
06-24-2019, 11:30 PM
neuron
    Thread: Pagination problem, How I can remove the current page from right side ?
Post: RE: Pagination problem, How I can remove the curre...

it looks like it is a CSS styling problem not related to backend code. some styles given to .active class making it to display in this way
4,264 Views
8 Replies
06-18-2019, 12:30 AM
neuron
    Thread: DB design help
Post: RE: DB design help

kilishan Wrote: (06-07-2019, 07:18 AM) -- You could have a customer table that has nullable user_id and [b]company_id[/id] columns. Fill in the one that's relevant and leave the other blank and build...
3,837 Views
5 Replies
06-07-2019, 07:41 AM
neuron

Theme © iAndrew 2016 - Forum software by © MyBB