Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Cant send Email over SMTP
Post: RE: Cant send Email over SMTP

This is probably not your issue, but for others who may stumble upon this thread, make sure your hosting provider allows outbound e-mail to go through an external SMTP server. Many hosts (including mi...
1,715 Views
5 Replies
11-30-2021, 08:16 PM
mlurie
    Thread: Entities and relationship
Post: RE: Entities and relationship

Personally, I like to use Entities to help with this. When there is a foreign key referencing another database table, I use SQL joins to pull in foreign data as part of a single SELECT statement.  The...
2,597 Views
7 Replies
10-26-2021, 09:09 AM
mlurie
    Thread: How insert null on save in select field
Post: RE: How insert null on save in select field

In your model, create the following method: PHP Code: -- protected function setDefaultIDMezzi(array $data) {     if(!isset($data['data']['id_mezzi']))         $data['data']['id_mezzi'] = NULL; ...
720 Views
2 Replies
10-26-2021, 08:35 AM
mlurie
    Thread: 404 Not Found from Android Home Screen Icon
Post: 404 Not Found from Android Home Screen Icon

I've just completed a project and everything is working perfectly except one nagging issue.  When I try to access the project's website from an icon added to my Android home screen either from Firefox...
476 Views
0 Replies
09-06-2021, 11:05 AM
mlurie
    Thread: Overwrite file instead create new file
Post: RE: Overwrite file instead create new file

Add "true" as the optional third parameter. PHP Code: -- if($file->move(WRITEPATH.'/uploads/my_dir/', $newName, true)) --
819 Views
2 Replies
07-19-2021, 12:09 PM
mlurie
    Thread: VScode - undefined 'getVar' method in version 4.1.2
Post: RE: VScode - undefined 'getVar' method in version ...

I found a solution on the PHP Intelephense GitHub page here: https://github.com/bmewburn/vscode-intelephense/issues/1670.  Add the following code to your Base Controller: PHP Code: --        /**...
3,896 Views
8 Replies
05-28-2021, 11:15 AM
mlurie
    Thread: How to run Transactions in controller?
Post: RE: How to run Transactions in controller?

Add this to your BaseController in the "Preload" section of the initController method: PHP Code: -- $this->db = \Config\Database::connect(); //Load database connection -- You should then be able...
1,269 Views
3 Replies
04-06-2021, 09:44 AM
mlurie
    Thread: Problem with redirect and routes
Post: RE: Problem with redirect and routes

First you will need to make sure make sure automatic routing is enabled and/or you have defined your custom routes in app\Config\Routes.php.  You can find the documentation here: https://codeigniter.c...
1,938 Views
7 Replies
03-27-2021, 07:39 AM
mlurie
    Thread: source code says Request::getMethod() is deprecated, what to use?
Post: RE: source code says Request::getMethod() is depre...

The method is not deprecated, the optional [$upper] parameter is deprecated. In the future the request method name will only be returned in lower case. You may review the documentation here: https:/...
5,861 Views
10 Replies
02-25-2021, 06:01 PM
mlurie
    Thread: Inserting/Updating "Userstamps" from a Model
Post: RE: Inserting/Updating "Userstamps" from a Model

Create a new custom model with the above functions that extends the CodeIgniter Model. Then in all of your other models, you will extend this new custom model instead of extending the CodeIgniter mod...
4,339 Views
10 Replies
12-21-2020, 07:13 AM
mlurie
    Thread: Number of results is wrong
Post: RE: Number of results is wrong

This is working as intended. countAll() returns the total number of rows in a table.  Use countAllResults() to get the number or rows returned by a query.  The documentation can be reviewed here: http...
928 Views
3 Replies
12-16-2020, 09:15 PM
mlurie
    Thread: Why unknow column 'slug_safelink' ?
Post: RE: Why unknow column 'slug_safelink' ?

Make sure you spelled 'slug_safelink' the same way in your MySQL database. I just ran into this today.
1,100 Views
3 Replies
11-09-2020, 02:57 PM
mlurie
    Thread: Assignment Operator := breaks the query builder
Post: RE: Assignment Operator := breaks the query builde...

Try adding the optional FALSE parameter to the select method documented here: https://codeigniter.com/user_guide/database/query_builder.html#selecting-data. PHP Code: -- $this->builder->select('*,...
694 Views
1 Replies
11-04-2020, 10:55 AM
mlurie
    Thread: Why unknow column 'slug_safelink' ?
Post: RE: Why unknow column 'slug_safelink' ?

Did you initialize the $allowedFields array in your Model? PHP Code: -- protected $allowedFields = ['nama_safelink', 'slug_safelink', 'url_safelink', 'hits_safelink']; -- Also, you don't really ...
1,100 Views
3 Replies
11-04-2020, 10:45 AM
mlurie
    Thread: Can I have 2 tables in codeigniter 4 model?
Post: RE: Can I have 2 tables in codeigniter 4 model?

I've never used CI3, but I have been able to accomplish what you describe in CI4 by using the standard CI4 model and Entities.  Create a method inside your model that joins other tables with your mode...
6,059 Views
4 Replies
10-28-2020, 06:46 PM
mlurie
    Thread: Multiple ignore-fields for is_unique-function
Post: RE: Multiple ignore-fields for is_unique-function

I'm not sure I am interpreting your question correctly, but in general, if you need two fields to be unique, you will need to create a separate validation rule for each field. If you are trying to ...
1,763 Views
4 Replies
10-28-2020, 06:02 PM
mlurie
    Thread: MySQL UNION statement and Query Builder?
Post: MySQL UNION statement and Query Builder?

Is there any way to write a MySQL UNION statement with Query Builder?  I have reviewed the documentation and cannot find the answer.
915 Views
2 Replies
10-23-2020, 02:06 PM
mlurie
    Thread: Form-Action Variables not working while routing
Post: RE: Form-Action Variables not working while routin...

T.O.M. Wrote: (10-20-2020, 01:55 AM) -- You must set `method="post"` in your form. If it is not set, then form sends data with GET. And you are trying to get data from POST - $this->request->getPos...
1,159 Views
4 Replies
10-21-2020, 04:24 PM
mlurie
    Thread: Form-Action Variables not working while routing
Post: RE: Form-Action Variables not working while routin...

You need to add your form submit button before form_close() PHP Code: -- echo form_open('/action_route'); echo form_input('input_name', 'input_value'); echo form_submit('submit_name', 'submit_va...
1,159 Views
4 Replies
10-19-2020, 05:49 PM
mlurie
    Thread: required_with Validation Rule works on inserts but not updates
Post: RE: required_with Validation Rule works on inserts...

mlurie Wrote: (10-10-2020, 08:27 PM) -- I have a form where a select menu is disabled by default.  It's enabled when a when a checkbox is checked and disabled when the checkbox is uncheck using a bit...
926 Views
1 Replies
10-11-2020, 03:31 PM
mlurie

Theme © iAndrew 2016 - Forum software by © MyBB