CodeIgniter Forums
I need LOCK IN SHARE MODE for database model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: I need LOCK IN SHARE MODE for database model (/showthread.php?tid=79516)



I need LOCK IN SHARE MODE for database model - mostafiz80 - 06-28-2021

I need LOCK IN SHARE MODE for database model when i use transaction. how  can i add this in the query. i saw codeigniter built in transStart if i use this transStart. do i need to use LOCK IN SHARE MODE or it will auto lock the query? i have no idea please someon help me.

One more thing i have to say the speed codeigniter is so fast.
I just love it. thankyou codeigniter team.


RE: I need LOCK IN SHARE MODE for database model - InsiteFX - 06-28-2021

You would need to build your own queries to lock and unlock.
MySQL Table Locking


RE: I need LOCK IN SHARE MODE for database model - mostafiz80 - 06-28-2021

(06-28-2021, 05:11 AM)InsiteFX Wrote: You would need to build your own queries to lock and unlock.
MySQL Table Locking

In codeigniter how can protect from SQL injection. how to clean user input?


RE: I need LOCK IN SHARE MODE for database model - InsiteFX - 06-28-2021

Protecting identifiers


RE: I need LOCK IN SHARE MODE for database model - mostafiz80 - 06-29-2021

is it good practice? if i use form validation for SQL injection & XSS attack instead prepare statement.


RE: I need LOCK IN SHARE MODE for database model - superior - 07-02-2021

Why don't you use prepared statements for this?
I think that's a better approach against validating requests.


RE: I need LOCK IN SHARE MODE for database model - mostafiz80 - 07-03-2021

alpha_numric not enugh for SQL injection filter?


RE: I need LOCK IN SHARE MODE for database model - superior - 07-09-2021

That depends on the input, for insert/update i prefer using prepared statements, and on output i use the esc(); function. You should never trust any input/output always be aware of abuse.


RE: I need LOCK IN SHARE MODE for database model - InsiteFX - 07-09-2021

You query bindings then.