obsidian/MyObsidianVault/Knowledgebase/WebDev/2 CodeIgniter/_Course Notes/03.) Query Builder - insert, update , delete and select.md

28 lines
685 B
Markdown
Raw Normal View History

2024-11-12 09:08:12 +01:00
https://www.youtube.com/watch?v=QaNGT-hj0so&list=PLT9miexWCpPW6Z_OXNv2d78cqCrZaPrVG&index=8
![[Pasted image 20241112083749.png]]
![[Pasted image 20241112084116.png]]
Add route to Controller+method in Config/Routes.php:
![[Pasted image 20241112084252.png]]
Example for using where clause ( second parameter in update method ):
![[Pasted image 20241112084920.png]]
Delete:
![[Pasted image 20241112085347.png]]
Select all:
![[Pasted image 20241112090019.png]]
![[Pasted image 20241112090048.png]]
Select with where clause
![[Pasted image 20241112090400.png]]
For single row result, we directly load into Array ( instead of Array of Array)
![[Pasted image 20241112090526.png]]