Query Bindings Problem |
(06-10-2020, 09:15 PM)php_rocs Wrote: @abelhermar, Hi!!, I use CodeIgniter 3.1.10. The problem in query is when I use a string value, for example: $var1 = 1; $var2 = 2; $var3 = 3; $sentence = "SELECT column1, column2, column3 FROM table WHERE column1 = ? AND column2 = ? and column3 = ?"; $query = $this->db->query($sentence, array(intval($var1), intval($var2), intval($var3))); If only send a integer values, the query work's perfectly, $var = "A"; I don´t know If I'm using correctly the parameters in sentence $this->db->query($sentence, array(strval($var)); I'm going to read the documentacion about CI profiler, thank's. |
Messages In This Thread |
Query Bindings Problem - by abelhermar - 06-10-2020, 08:12 AM
RE: Query Bindings Problem - by php_rocs - 06-10-2020, 09:15 PM
RE: Query Bindings Problem - by abelhermar - 06-12-2020, 08:06 AM
RE: Query Bindings Problem - by dave friend - 06-12-2020, 10:17 AM
RE: Query Bindings Problem - by abelhermar - 06-12-2020, 12:03 PM
RE: Query Bindings Problem - by dave friend - 06-12-2020, 06:58 PM
RE: Query Bindings Problem - by abelhermar - 06-15-2020, 10:47 AM
RE: Query Bindings Problem - by php_rocs - 06-15-2020, 06:53 PM
|