Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: DB Insert Timing
Post: RE: DB Insert Timing

kenjis Wrote: (01-18-2023, 06:04 PM) -- $useTimestamps is a property in Model. See https://codeigniter4.github.io/CodeIgniter4/models/model.html#configuring-your-model I recommend you read the us...
402 Views
11 Replies
01-27-2023, 11:02 AM
SoccerGuy3
    Thread: DB Insert Timing
Post: RE: DB Insert Timing

kenjis Wrote: (01-17-2023, 06:37 PM) -- The $useTimestamps is false by default. https://codeigniter4.github.io/CodeIgniter4/models/model.html#usetimestamps If it is false, CI Model does not set the...
402 Views
11 Replies
01-18-2023, 07:33 AM
SoccerGuy3
    Thread: DB Insert Timing
Post: RE: DB Insert Timing

kenjis Wrote: (01-16-2023, 09:03 PM) -- Check your real SQL statements with Debug Toolbar or DB Server log. -- Code: -- INSERT INTO `auction_lots_versions` (`parent_id`, `created_at`, `createdby_i...
402 Views
11 Replies
01-17-2023, 10:58 AM
SoccerGuy3
    Thread: DB Insert Timing
Post: RE: DB Insert Timing

kenjis Wrote: (01-16-2023, 05:20 PM) -- How do you set the  created_at value? Using Model $useTimestamps? https://codeigniter4.github.io/CodeIgniter4/models/model.html#usetimestamps -- No, I let...
402 Views
11 Replies
01-16-2023, 05:26 PM
SoccerGuy3
    Thread: DB Insert Timing
Post: RE: DB Insert Timing

kenjis Wrote: (01-16-2023, 04:49 PM) -- Can you show minimum sample code? -- Sure. Here it is (I cut out a bunch of stuff that isn't relative - the code works, it is just the time stamp I am questio...
402 Views
11 Replies
01-16-2023, 04:59 PM
SoccerGuy3
    Thread: DB Insert Timing
Post: DB Insert Timing

Ran into something strange today. Running CI4.2.11 with PHP 8.025 I have a process setup that takes some input, does an insert into the database, opens a dialog box which is a confirmation, takes tha...
402 Views
11 Replies
01-16-2023, 03:59 PM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

kenjis Wrote: (11-10-2022, 06:42 PM) -- See https://codeigniter4.github.io/CodeIgniter4/database/query_builder.html#CodeIgniter\Database\BaseBuilder::from -- Thanks. Not sure how I managed to miss ...
788 Views
12 Replies
11-11-2022, 07:18 AM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

kenjis Wrote: (11-09-2022, 12:37 AM) -- I found tips to get QueryBuilder from the Model: https://github.com/codeigniter4/CodeIgniter4/issues/4527#issuecomment-869103637 -- Ok, that seems to "fix" ...
788 Views
12 Replies
11-10-2022, 08:56 AM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

davis.lasis Wrote: (11-09-2022, 12:30 AM) -- As far as i can see (without testing my-self), you have a syntax error in your example code. You have `n` not `news` and order_by must have those tables ...
788 Views
12 Replies
11-09-2022, 05:25 PM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

kenjis Wrote: (11-08-2022, 04:46 PM) -- It is not a super easy query. I don't know how to properly write it in Model. If you really like to use an alias, it seems better to extend Model to add $a...
788 Views
12 Replies
11-08-2022, 04:50 PM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

kenjis Wrote: (11-07-2022, 06:00 PM) -- Query Builder can use alias (short name). https://codeigniter4.github.io/CodeIgniter4/database/query_builder.html PHP Code: -- $db      = \Config\Database...
788 Views
12 Replies
11-08-2022, 09:49 AM
SoccerGuy3
    Thread: Table short name and queries
Post: RE: Table short name and queries

kenjis Wrote: (11-07-2022, 04:53 PM) -- You cannot use short name in $table. $table is a table name. 'mailing_suggestedchanges msc' is not a table name. You are confusing the Model and QueryBui...
788 Views
12 Replies
11-07-2022, 05:36 PM
SoccerGuy3
    Thread: Table short name and queries
Post: Table short name and queries

Hey all. Using CI 4.2.6 and having some issues with trying to use a table short name in my queries. In my model if I put: PHP Code: -- protected $table = 'mailing_suggestedchanges msc'; -- And do...
788 Views
12 Replies
11-07-2022, 04:37 PM
SoccerGuy3
    Thread: How Cancel The Delete in ‘’$useSoftDeletes = true‘’
Post: RE: How Cancel The Delete in ‘’$useSoftDeletes = t...

ozornick Wrote: (07-27-2022, 11:28 PM) -- Yesterday I ran into this situation. If you set the entity $user->deletedAt = null, it may not be able to update the entry. It says "No data to update" The ...
687 Views
4 Replies
10-14-2022, 08:14 AM
SoccerGuy3
    Thread: Post Update Compare Script
Post: RE: Post Update Compare Script

Thanks. The Liaison ( https://github.com/paulbalandan/liaison-revision ) sounds like the right one (or at least the closest to what I remember. The one I remember just created backups for the files in...
339 Views
2 Replies
09-13-2022, 06:32 AM
SoccerGuy3
    Thread: Post Update Compare Script
Post: Post Update Compare Script

Hey all,  A while back I came across a script that could be run against a CI update (via composer) and it would compare the files that changed against the old files (like the files in App >> Config) ...
339 Views
2 Replies
09-12-2022, 02:49 PM
SoccerGuy3
    Thread: Route Hierarchy (order)
Post: RE: Route Hierarchy (order)

kenjis Wrote: (08-19-2022, 04:12 PM) -- See https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html#route-priority -- Nice!
560 Views
7 Replies
08-19-2022, 04:19 PM
SoccerGuy3
    Thread: Route Hierarchy (order)
Post: RE: Route Hierarchy (order)

kenjis Wrote: (08-18-2022, 06:31 PM) -- It seems there is no clear description for route priority in the user guide, I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/6391 -- Thanks f...
560 Views
7 Replies
08-19-2022, 07:11 AM
SoccerGuy3
    Thread: Route Hierarchy (order)
Post: RE: Route Hierarchy (order)

iRedds Wrote: (08-18-2022, 10:40 AM) -- The routes are iterated to the first match, so the URL https://domain.com/admin/settings will be handled by the second route. You need to move the second rout...
560 Views
7 Replies
08-18-2022, 11:06 AM
SoccerGuy3
    Thread: Route Hierarchy (order)
Post: Route Hierarchy (order)

Not seeing an obvious answer to my question in the docs or forums, so.... I am wondering about routes and specifically how CI (4.2) handles two similar routes. Does it take the first one it comes acr...
560 Views
7 Replies
08-18-2022, 07:47 AM
SoccerGuy3

Theme © iAndrew 2016 - Forum software by © MyBB