Welcome Guest, Not a member yet? Register   Sign In
Active Record substring problem
#2

[eluser]webb_design[/eluser]
Got a workaround for now. When I use aliases of SUBSTRING (SUBSTR and MID), CI doesn't remove them. Here's what I did instead:

Code:
$this->db->select("CONCAT_WS('-', SUBSTRING(test, 1, 5), SUBSTR(test, 6, 10)) AS testing");

But... this is a pretty dumb hack. Does anyone know why CI is removing the multiple SUBSTRINGs? It almost seems like it's trying to combine them together. I tried overloading the select() method with FALSE to disable escaping but that didn't help.

Thanks.


Messages In This Thread
Active Record substring problem - by El Forum - 12-14-2009, 01:37 PM
Active Record substring problem - by El Forum - 12-15-2009, 12:41 AM
Active Record substring problem - by El Forum - 02-25-2010, 07:45 PM
Active Record substring problem - by El Forum - 06-07-2012, 03:19 PM
Active Record substring problem - by El Forum - 06-07-2012, 06:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB