Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to Print Single Name
Post: RE: How to Print Single Name

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

PHP Code: -- static::$hasRun = 1; --
186 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). ...
337 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
1,351 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: [             ...
751 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) => ...
531 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
751 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]' ]; --
672 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
619 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.
659 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]); --
1,047 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.
1,170 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.
1,066 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...
1,749 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/
10,851 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...
6,832 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?
749 Views
4 Replies
12-17-2020, 04:04 PM
ojmichael
    Thread: Call to undefined method App\Models\[...]::transStart
Post: RE: Call to undefined method App\Models\[...]::tra...

PHP Code: -- $info['updated']        = time(); -- Why is this line using the variable $info and not $val (like the rest) ?
1,818 Views
6 Replies
11-29-2020, 11:34 PM
ojmichael
    Thread: mySQL Stored Procedure "does not exist"
Post: RE: mySQL Stored Procedure "does not exist"

PHP Code: -- USE `archives`; DROP procedure IF EXISTS `spinup`; DELIMITER $$ USE `archives`$$ CREATE PROCEDURE `spinup` () BEGIN -- creating tables here.... SELECT "DONE"; END$$ DE...
1,560 Views
6 Replies
11-26-2020, 09:23 PM
ojmichael
    Thread: Save php code in database
Post: RE: Save php code in database

Save your posts in the DB without the base_url() then add a base tag to your template in the head section. PHP Code: --
1,432 Views
5 Replies
11-22-2020, 09:21 PM
ojmichael

Theme © iAndrew 2016 - Forum software by © MyBB