You are a great teacher Alex. I am glad I came across your channel. You have shown us how to be productive and actually get to build software with CodeIgniter. thanks for sharing wishing you every success.
Hello, thanks for the videos. They're really helpfull. I wonder if you could share your code snipets for CI development and maybe the extensions you use with VS Code on your daily work. Thank you in advance.
Hello Alex, I have a question and I can't seem to solve it. Say I have Table A, B, C and so on. Currently this is my code : return $this->db->table('users') ->groupStart() ->where('username', $str) ->orWhere('email', $str) ->groupEnd() ->join('add_game', 'add_game.user_id = users.user_id') ->get() ->getResultArray(); Right now, the result I am getting is the data from Table A is displaying multiple record based on the records I have in other tables. User A : Brand A User A : Brand B User A : Brand C How do I only show the data from Table A once. Example : User A : Brand A Brand B Brand C What am I missing here? Or do I have to do a foreach loop twice? Is there a way that I just do a foreach loop once? Hope to hear from you soon. Thanks in advance!
Greetings from a venezuelan in Colombia. What a greats videos , thanks for charing your knowledge ... Would you mind to tell me which vs code theme you're using?
Very nice Alex ! Just a question regarding the JOIN query. It's very common to have multiple database fields having the same name in different tables. (eg: table1.name, table2.name, ...) When coding those JOIN query, it creates a problem when wanting to echo these fields. What is your best approach to solve it without too much extra code ? (and without renaming all database fields to make them unique and longer) Thank you !
hello alex how can i convert this sql statement to codeigniter "Select * from table WHERE `field` LIKE '%string1%' OR `field` LIKE '%string2%'" thanks in advance.
would you like ti give us some example, how to use subquery with CI4 example code : select count(*) summaterial ,c.negara_id,sum(nominalready) as totalready from ( SELECT a.country_id,a.id_material,sum(b.ready),a.prize_unit,sum(b.ready) * a.prize_unit as nominalready, sum(b.notready) * a.prize_unit as nominalnotready FROM material as a left join stok as b on a.id_material=b.material_id group by a.id_material ) as c group by c.country_id; would you like convert it to query builder?
Hello, nice video i cant understand how pass data from controller to model query builder for example i want get one contact card view by query builder where('id', $findid) how pass $findid variable? or i should this done in controller? and second question this below as example written is query builder example or not? If yes why no connection to DB and its working? PHP Code: public function getNews($id = false) { if ($id === false) { return $this->findAll(); } return $this->asArray() ->where() ->first(); }
SELECT voted_user,count(*) FROM `voting` GROUP BY voted_user How can I convert this mysql code to query builder class in codeignitor framework.. Thanks
$db = connect_db(); $builder = $db->table('YOUR_TABLE'); $builder->selectCount('voted_user'); or $builder->countAll(); //depends on your needs $builder->groupBy("voted_user"); $query = $builder->get(); Something like that should work
Millions of Thanks for in detail description of everything
You are a great teacher Alex. I am glad I came across your channel. You have shown us how to be productive and actually get to build software with CodeIgniter. thanks for sharing wishing you every success.
Thank you, im learning so much with your videos from Brazil !
I like your tutorials very much. Please make video on prevent sql injection in codeigniter4. How to use prepare statement and excute in ci4.
Great course, but how do we get the results passed to a view? small sample would help, appreciated!
Thanks, Alex. Please we need a tutorial on Codeigniter 4 multi-language
Hello, thanks for the videos. They're really helpfull. I wonder if you could share your code snipets for CI development and maybe the extensions you use with VS Code on your daily work. Thank you in advance.
Hi Alex, why do I have to add routes manually in my routing file?
FYI- I did not use composer to install CI4
Thanks Alex, how to use pagination with Query Builder
why is everyone using print_r... will my users see raw datas? why not use view and make this proper
Hello Alex, I have a question and I can't seem to solve it. Say I have Table A, B, C and so on. Currently this is my code :
return $this->db->table('users')
->groupStart()
->where('username', $str)
->orWhere('email', $str)
->groupEnd()
->join('add_game', 'add_game.user_id = users.user_id')
->get()
->getResultArray();
Right now, the result I am getting is the data from Table A is displaying multiple record based on the records I have in other tables.
User A : Brand A
User A : Brand B
User A : Brand C
How do I only show the data from Table A once. Example :
User A : Brand A
Brand B
Brand C
What am I missing here? Or do I have to do a foreach loop twice? Is there a way that I just do a foreach loop once? Hope to hear from you soon. Thanks in advance!
Greetings from a venezuelan in Colombia. What a greats videos , thanks for charing your knowledge ... Would you mind to tell me which vs code theme you're using?
thanks man you are really good teacher
I appreciate that!
At 21:11 you write wrong ascending. Is ASC not ACS. Thank you very much for your tuts. Are so usefull and very importants for me!
Very nice Alex !
Just a question regarding the JOIN query.
It's very common to have multiple database fields having the same name in different tables. (eg: table1.name, table2.name, ...)
When coding those JOIN query, it creates a problem when wanting to echo these fields.
What is your best approach to solve it without too much extra code ? (and without renaming all database fields to make them unique and longer)
Thank you !
Thank you sir
Can we setup aliases for tables and fields?
Please explain Routes
You know my request alex, a mini project with CI-4 restful api and Vuejs... Please make it as ur first preference, thanks Alex in advance ✌️😍
Stay tuned today!!!!
Like you video bro.
Keep it up.
Please make some project with codeignator 4 it will help us more .
Thanks for everything 🧡💜🖤
:-):-)
Yes I will. Thanks for the support. Don't forget to subscribe :)
@@AlexLancer Subscribe already done bro. Keep it up we are always with you 🧡💜🖤
HI Alex, Excelent job, thanks for bring to us this tutorials!!
i have a question : The models can be use for any Database (mysql, postgre, MSSQL?)
The codeigniter extensions on VS code isn't working. It does not show intellisense at all. I did restart VS code and it did not help. Please advice.
Thank you for the really nice tutorial!
You're very welcome!
hello alex how can i convert this sql statement to codeigniter "Select * from table WHERE `field` LIKE '%string1%' OR `field` LIKE '%string2%'" thanks in advance.
Please a ci4 full project on online examination and result generation
Hey, Iboyaima, not something that is on my ToDo list at the moment. Maybe at some time in fututre. Thanks for the suggestion, though.
Sir make a video on LOGIN WITH GOOGLE / FACEBOOK
Manideep, thanks for the idea. I am considering doing that.
@@AlexLancer 🤩thanks a alot.🤩I'm waiting
@@AlexLancer if you have time , also make a video on email class in codeigniter4 to send mails please.
would you like ti give us some example, how to use subquery with CI4
example code :
select count(*) summaterial ,c.negara_id,sum(nominalready) as totalready from
(
SELECT a.country_id,a.id_material,sum(b.ready),a.prize_unit,sum(b.ready) * a.prize_unit as nominalready,
sum(b.notready) * a.prize_unit as nominalnotready FROM material as a
left join stok as b on a.id_material=b.material_id group by a.id_material
) as c
group by c.country_id;
would you like convert it to query builder?
Hello, nice video
i cant understand how pass data from controller to model query builder for example
i want get one contact card view by query builder where('id', $findid) how pass $findid variable?
or i should this done in controller?
and second question this below as example written is query builder example or not? If yes why no connection to DB and its working?
PHP Code:
public function getNews($id = false) { if ($id === false) { return $this->findAll(); } return $this->asArray() ->where() ->first(); }
Hello Alex,
I want to join 3 tables together. How I can do this?
You have to use three or more join statements (I mean $this->db->join()) for each one of the tables
hello alex how can i convert
$cici = $this->db->query("SELECT max(ID_Pendaftaran) as kodeTerbesar FROM pendaftaran_skhpn");
$kd = "";
if($cici->num_rows()>0){
foreach($cici>result() as $k){
$tmp = ((int)$k->Kode_max)+1;
$kd = sprintf("%04s", $tmp);
}
}else{
$kd= "0001";
}
date_default_timezone_set('Asia/Jakarta');
return (date('dmy').$kd);
SELECT voted_user,count(*) FROM `voting` GROUP BY voted_user
How can I convert this mysql code to query builder class in codeignitor framework..
Thanks
$db = connect_db();
$builder = $db->table('YOUR_TABLE');
$builder->selectCount('voted_user'); or $builder->countAll(); //depends on your needs
$builder->groupBy("voted_user");
$query = $builder->get();
Something like that should work
❤
thanks!
Please Ci4+rest api+openapi swagger
Maybe in future.
payment getway in codeigniter 4.0.3
More specific ?