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

[eluser]webb_design[/eluser]
Why is the Active Record class removing multiple substrings in my query? I'm trying to do something like this:

Code:
SELECT CONCAT_WS('-', SUBSTRING(test, 1, 5), SUBSTRING(test, 6, 5)) AS testing

But it's returning this:

Code:
SELECT CONCAT_WS('-', SUBSTRING(test, 1, 5), 6, 5)) AS testing

How can I prevent this from happening?

Thanks.

UPDATE

The above is the final query, in code I'm doing this:

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


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