Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: v4.3.6 bug fix released
Post: RE: v4.3.6 bug fix released

Thank you for your work!
4,115 Views
6 Replies
06-19-2023, 12:04 PM
IvanBell
    Thread: url_to not working?
Post: RE: url_to not working?

Thank you, the problem was with the routes. It was not obvious for me from the docs that url_to() only works if I have the route inside Config/Routes. Lack of experience, I guess
3,363 Views
6 Replies
08-30-2021, 11:33 PM
IvanBell
    Thread: pagination with parameters! (filtering)
Post: RE: pagination with parameters! (filtering)

I have a website that combines pagination and filtering. You can use GET method, receive the data in controller, unset "page" key and proceed to the model with the rest. Please see my old question, pe...
10,457 Views
6 Replies
08-30-2021, 12:42 PM
IvanBell
    Thread: url_to not working?
Post: RE: url_to not working?

I have a similar problem. Inside "Controllers" folder I have "Admin" folder. And I can't get path to a controller inside it, it throws the same error. Code: --
3,363 Views
6 Replies
08-30-2021, 12:16 PM
IvanBell
    Thread: Pagination
Post: RE: Pagination

If the table is specified in your model, I believe you can put this code in the controller and get the same result: $data['results'] = $TecnicsModel->where('published', 1)->paginate($number_of_result...
1,604 Views
2 Replies
03-28-2021, 01:06 AM
IvanBell
    Thread: How To Add Filter On Specified HTTP Method and Controller in Routes.php?
Post: RE: How To Add Filter On Specified HTTP Method and...

Shouldn't it be $routes instead of $rotues?
2,407 Views
4 Replies
03-06-2021, 08:53 AM
IvanBell
    Thread: form helper [type=email]
Post: RE: form helper [type=email]

Both this: Code: -- -- and this: Code: -- -- give me the same output: Code: -- -- However note, that in the second case type is the forth parameter, so you must specify the three parameters...
2,668 Views
2 Replies
02-26-2021, 10:51 AM
IvanBell
    Thread: form_checkbox with set_checkbox
Post: RE: form_checkbox with set_checkbox

This question was submitted a couple of years ago, but maybe my answer will benefit someone. I was working on a form and ended up with this solution: Code: -- $checkbox_data = [ 'name' => 'name...
1,974 Views
1 Replies
02-01-2021, 07:57 AM
IvanBell
    Thread: Array to string conversion error when sorting array
Post: RE: Array to string conversion error when sorting ...

Thanks a lot! I have easily solved my problem with your help
5,900 Views
3 Replies
11-18-2020, 11:08 AM
IvanBell
    Thread: Array to string conversion error when sorting array
Post: Array to string conversion error when sorting arra...

Hello! Suppose I have a database with a column called "weight" and I have this function in my model: Code: -- public function test()     {         return $this->select('weight')                  ...
5,900 Views
3 Replies
11-17-2020, 01:54 PM
IvanBell
  Smile Thread: Query Builder "Where" with Array
Post: RE: Query Builder "Where" with Array

I have been able to achieve desired result. It was easier than I thought actually :)  My code looks like this now: Code: -- $this->where('catalog', $category); unset($postFilters['page']); foreach...
10,099 Views
7 Replies
05-28-2020, 02:24 AM
IvanBell
    Thread: Query Builder "Where" with Array
Post: RE: Query Builder "Where" with Array

Thanks for your replies. Since right now I have only 2 columns, my temporary solution is this: Code: -- $this->where('catalog', $category); if (array_key_exists('brand', $postFilters)) { $th...
10,099 Views
7 Replies
05-19-2020, 10:47 AM
IvanBell
    Thread: Query Builder "Where" with Array
Post: RE: Query Builder "Where" with Array

Sorry, it doesn't change anything. My $postFilters contains brands and countries selected in the form. I need "OR" between brands and countries, not between $catalog and $postFilters
10,099 Views
7 Replies
05-18-2020, 08:47 AM
IvanBell
    Thread: Query Builder "Where" with Array
Post: RE: Query Builder "Where" with Array

I believe the problem is that "where" query uses AND. So it basically says "select items where country is Germany AND country is Sweden". I need AND between different categories, but OR between specif...
10,099 Views
7 Replies
05-18-2020, 05:01 AM
IvanBell
    Thread: Query Builder "Where" with Array
Post: Query Builder "Where" with Array

Hello everyone! I just started learning CodeIgniter 4 and will be very thankful if you help with my problem. In my database I have a table with various products. The table has columns "brand" and "cou...
10,099 Views
7 Replies
05-18-2020, 02:52 AM
IvanBell

Theme © iAndrew 2016 - Forum software by © MyBB