Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: ORM or SQL?
Post: RE: ORM or SQL?

InsiteFX Wrote: (03-18-2022, 12:03 AM) -- If you have a lot of business logic that needs multiple models then create a library and load the models in it. -- Thank you
1,111 Views
7 Replies
03-19-2022, 07:30 AM
frocco
    Thread: How to return calculated from model?
Post: RE: How to return calculated from model?

The only way I see to get this working is to rename the categories primary key id to cat_id Then I can remove the ->select('products.id,name,sku,image,image2,image3,cat_pic') statement an...
510 Views
1 Replies
03-17-2022, 01:00 PM
frocco
    Thread: How to return calculated from model?
Post: How to return calculated from model?

Hello, not sure where to put this. I have a database table that has several price fields, price1, price2... After I query the table, I want to access the price field that would be one of those. ...
510 Views
1 Replies
03-17-2022, 07:41 AM
frocco
    Thread: ORM or SQL?
Post: RE: ORM or SQL?

ignitedcms Wrote: (03-17-2022, 07:14 AM) -- No I typically put my query builder logic in models, but if I understood correctly was the question regarding the pros and cons of using a ORM? -- ok, th...
1,111 Views
7 Replies
03-17-2022, 07:28 AM
frocco
    Thread: ORM or SQL?
Post: RE: ORM or SQL?

iRedds Wrote: (03-17-2022, 06:57 AM) -- Controllers, models,... for what? Write everything in one file and layout and query to the database. -- I do not understand your suggestion. Can you explai...
1,111 Views
7 Replies
03-17-2022, 07:09 AM
frocco
    Thread: ORM or SQL?
Post: ORM or SQL?

Hello, What is the best practice for db work by most developers? Them orm must have more overhead dealing with models and entities. Is it better to just use sql? if so, do most of you use sql in...
1,111 Views
7 Replies
03-17-2022, 06:09 AM
frocco
    Thread: hasChanged not working
Post: RE: hasChanged not working

>>You can use an array of keys
689 Views
5 Replies
03-12-2022, 12:32 PM
frocco
    Thread: hasChanged not working
Post: RE: hasChanged not working

I had to remove the fill method for this to work with summernote. Code: -- $data = $this->request->getPost(); //$page->fill($this->request->getPost()); -- and change to assign each po...
689 Views
5 Replies
03-12-2022, 12:00 PM
frocco
    Thread: hasChanged not working
Post: RE: hasChanged not working

spreaderman Wrote: (03-10-2022, 08:43 PM) -- Hi, I had a similar problem.  This was my problem and my solution;  https://stackoverflow.com/questions/67747865/codeigniter-4-haschanged-i-was-expecting-...
689 Views
5 Replies
03-11-2022, 04:22 AM
frocco
    Thread: hasChanged not working
Post: hasChanged not working

I just display the form and press enter without making any changes. CodeIgniter\Database\Exceptions\DataException There is no data to update. Code: -- $model = new \App\Models\PageMod...
689 Views
5 Replies
03-10-2022, 05:13 PM
frocco
    Thread: session_id() returns blank
Post: RE: session_id() returns blank

iRedds Wrote: (03-10-2022, 01:11 PM) -- Did you start the session? -- No, I am using a fresh install of ci4. Where and how do you do this? Thanks [hr] frocco Wrote: (03-10-2022, 01:13 PM) --...
458 Views
2 Replies
03-10-2022, 01:13 PM
frocco
    Thread: session_id() returns blank
Post: session_id() returns blank

Hello, on ci4 and using MAMP free version. $id = session_id(); echo $id is blank I tried this on another framework and I see an id. Is there a setting I need to change? I am using the d...
458 Views
2 Replies
03-10-2022, 12:51 PM
frocco
    Thread: There is no data to update. error
Post: RE: There is no data to update. error

From what I can tell, it is a problem with the non bootstrap version of summernote and bulma. I changed to TinyMCE and have no issues.
354 Views
1 Replies
02-11-2022, 04:43 PM
frocco
    Thread: There is no data to update. error
Post: There is no data to update. error

Hello, I am using summernote for the textarea field Not sure what is causing this. Code: -- public function update()     {         $id = $this->request->getPost('id');         $record = $t...
354 Views
1 Replies
02-11-2022, 12:48 PM
frocco
    Thread: What is your favorite CI4-related learning resource?
Post: RE: What is your favorite CI4-related learning res...

snelledre Wrote: (12-20-2021, 02:35 PM) -- One off the best cources is on Udemy from Dave Hollingworth named "CodeIgniter 4: Build a Complete Web Application from Scratch " . -- I agree, great cou...
3,004 Views
14 Replies
02-09-2022, 09:05 AM
frocco
    Thread: Argument 2 passed to form_input() must be of the type string, null given
Post: RE: Argument 2 passed to form_input() must be of t...

iRedds Wrote: (01-22-2022, 04:41 PM) -- If the Document is an instance of an Entity, then it seems to me that it would be better to define a default value. PHP Code: -- protected $attributes = ['...
642 Views
4 Replies
01-22-2022, 06:57 PM
frocco
    Thread: Argument 2 passed to form_input() must be of the type string, null given
Post: RE: Argument 2 passed to form_input() must be of t...

I have to define it or my edit function does not fill the field. I solved it by doing this. Code: -- -- is this the best way?
642 Views
4 Replies
01-22-2022, 12:47 PM
frocco
    Thread: Argument 2 passed to form_input() must be of the type string, null given
Post: Argument 2 passed to form_input() must be of the t...

Hello, can someone explain what is wrong with this? Works fine if I just use $document]); } // Form shared with edit.php and new.php -- TypeError Argument 2 passed to form_inp...
642 Views
4 Replies
01-21-2022, 04:53 PM
frocco
    Thread: ion_auth messing up my query
Post: RE: ion_auth messing up my query

Thank you Paul. I will try this today.
2,716 Views
2 Replies
06-19-2017, 02:51 AM
frocco
    Thread: ion_auth messing up my query
Post: ion_auth messing up my query

Hello, Code: -- $user = $this->ion_auth->user()->row(); $this->db->where('appt_date >=', $FromAppt_Date); $this->db->where('appt_date
2,716 Views
2 Replies
06-18-2017, 11:28 AM
frocco

Theme © iAndrew 2016 - Forum software by © MyBB