Welcome Guest, Not a member yet? Register   Sign In
CI4 Transaction not working on me

PHP Code:
When a quoted data is receivedit gives an error and the undo operation does not work.
 this page have to 17 but getting error and not rollback. 
        foreach ($stoklar->DATA as $key => $w) {
          for ($i=0$i <count($w) ; $i++) {
            $w[$i]=htmlentities(stripslashes($w[$i]));//error was here i should add ,ENT_QUOTES, "UTF-8" i know i but wanna see transaction
          values ('

        if ($db->transStatus() === false) {
        } else {

You should not be using all capital letters for your variables, they are reserved for constants
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

What error message do you get?

And you should not use htmlentities() and stripslashes() with SQL statements.
If you don't know escaping in SQL well,
see https://codeigniter4.github.io/CodeIgnit...ng-queries

Theme © iAndrew 2016 - Forum software by © MyBB