Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Entity - allowedFields inconsistancy
Post: RE: Entity - allowedFields inconsistancy

I don't think entities have an allowedFields property.
2,762 Views
4 Replies
08-29-2021, 04:39 PM
ojmichael
    Thread: Problem in accessing query in construct
Post: RE: Problem in accessing query in construct

__construct is called before initController.
2,695 Views
5 Replies
08-11-2021, 12:00 AM
ojmichael
    Thread: Ajax response time higher than with CI3
Post: RE: Ajax response time higher than with CI3

Because CI4 is doing more than CI3 did.
5,549 Views
11 Replies
08-10-2021, 11:59 PM
ojmichael
    Thread: How to Print Single Name
Post: RE: How to Print Single Name

limit 1
2,277 Views
4 Replies
07-29-2021, 11:58 PM
ojmichael
    Thread: inhibiting image download
Post: RE: inhibiting image download

PHP Code: -- static::$hasRun = 1; --
6,379 Views
8 Replies
07-27-2021, 04:01 PM
ojmichael
    Thread: combining two rows wit the Query Builder
Post: RE: combining two rows wit the Query Builder

You can't do a GROUP BY on an INSERT statement. You'd need to merge the arrays before you insert them (or SELECT them, then merge the arrays then remove the rows and reinsert the merged array). ...
4,576 Views
4 Replies
07-07-2021, 12:00 AM
ojmichael
    Thread: Anybody Interested in contributing to establish an Edit Library?
Post: RE: Anybody Interested in contributing to establis...

This is the most confusing post I have seen here! CodeIgniter is inadequate because it is not a text editor!  :D
9,196 Views
11 Replies
05-10-2021, 04:21 PM
ojmichael
    Thread: Headless rendering on LAMP server
Post: RE: Headless rendering on LAMP server

PHP Code: -- const puppeteer = require('puppeteer'); const filePath = '/path/to/image.jpg'; const run = async _ => {     const browser = await puppeteer.launch({         args: [             ...
2,759 Views
5 Replies
04-26-2021, 04:07 PM
ojmichael
    Thread: How to pass parameters to lang from js?
Post: RE: How to pass parameters to lang from js?

PHP Code: -- {     'data': data => [         moment(data.published_date).format('DD/MM/YYYY'),         moment(data.published_date).format('HH:mm'),     ].reduce(         (acc, value, index) => ...
1,686 Views
3 Replies
04-20-2021, 07:50 PM
ojmichael
    Thread: Headless rendering on LAMP server
Post: RE: Headless rendering on LAMP server

You could do this with Puppeteer (this is a Node library): https://developers.google.com/web/tools/puppeteer
2,759 Views
5 Replies
04-20-2021, 04:28 PM
ojmichael
    Thread: How to validate data with in_list inside model
Post: RE: How to validate data with in_list inside model

I think that's what the is_not_unique method is for. PHP Code: -- protected $validationRules = [     'id' => 'required|is_not_unique[table.id]' ]; --
2,691 Views
4 Replies
04-18-2021, 11:36 PM
ojmichael
    Thread: Nested routes not working
Post: RE: Nested routes not working

All your assets look like they have relative paths, so they're loading via the wrong URL and getting 404. Wrap your CSS and JS files in site_url(); or set a
2,525 Views
4 Replies
04-16-2021, 12:03 AM
ojmichael
    Thread: I am currently using Codeigniter 4.1.1 how do you retrieve data from the $afterInsert
Post: RE: I am currently using Codeigniter 4.1.1 how do ...

It's useful if you need to update other data, trigger events, emails, logging etc. after performing the insert. It's not meant to mutate the data you just inserted, that wouldn't make sense.
2,584 Views
5 Replies
04-14-2021, 07:35 PM
ojmichael
    Thread: How to pass database result set from controller to a view
Post: RE: How to pass database result set from controlle...

PHP Code: -- echo view('blogview', ['data' => $data]); --
3,866 Views
7 Replies
03-28-2021, 04:50 PM
ojmichael
    Thread: Unnecessary Files Loaded in Production Environment - Codeigniter 4.1.1
Post: RE: Unnecessary Files Loaded in Production Environ...

Assuming you're using Docker, the composer commands listed above should be part of your Dockerfile, and you don't need to include the vendor folder in the image.
5,359 Views
9 Replies
02-21-2021, 08:48 PM
ojmichael
    Thread: CI3 error with query SQLSERVER
Post: RE: CI3 error with query SQLSERVER

Whatever you are trying to do, I do not think this is the most efficient way to do it.
3,584 Views
6 Replies
01-27-2021, 11:57 PM
ojmichael
    Thread: Migrating CI3 to CI4, need query->numRows function
Post: RE: Migrating CI3 to CI4, need query->numRows func...

Can you provide any code demonstrating why/how you are using this? You are performing a SELECT query but can't access the results array to perform a count() in PHP? Which database driver are you using...
7,582 Views
11 Replies
12-30-2020, 08:53 PM
ojmichael
    Thread: Database Num_rows()?
Post: RE: Database Num_rows()?

The php mysqli_num_rows function is just a wrapper for the native mysql_num_rows function - https://mariadb.com/kb/en/mysql_num_rows/
23,911 Views
11 Replies
12-29-2020, 04:45 PM
ojmichael
    Thread: DB doesn't have num_rows/numRows ??
Post: RE: DB doesn't have num_rows/numRows ??

Why are you replying to every thread about this? Why do you think performing a count() operation on the results array would be "wasting" CPU power but using mysql_num_rows or equivalent functions i...
14,425 Views
13 Replies
12-28-2020, 09:30 PM
ojmichael
    Thread: How to avoid having BOTH __construct AND initController!?
Post: RE: How to avoid having BOTH __construct AND initC...

What do you need to do in __construct that you could not do in initController?
2,245 Views
4 Replies
12-17-2020, 04:04 PM
ojmichael

Theme © iAndrew 2016 - Forum software by © MyBB