CodeIgniter Forums
Parameter to database select function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Parameter to database select function (/showthread.php?tid=75194)



Parameter to database select function - XTAZ - 01-08-2020

Hello!

In my opinion, function select must have a parameter for reset last select data

PHP Code:
public function select($select '*'bool $escape nullbool $reset false)
...
if (
$reset)
{
    
$this->QBSelect = [];
    
$this->QBNoEscape = [];
}
... 


Now in my code one function with join use $this->select('table.*'), so that not include addational table. After I use $this->select('table.id').

After in SQL:
SELECT table.*, table.id FROM ...

I dont want select all columns


RE: Parameter to database select function - InsiteFX - 01-09-2020

SELECT column_name(s) FROM table_name