Welcome Guest, Not a member yet? Register   Sign In
Call to undefined function CAST()
#5

Yeah, CAST is not part of CodeIgniter's QueryBuilder, so of course it's not finding it. Did you see docs somewhere that made you think it would be there? If so, we need to revise.

That's one of MANY SQL commands that don't have a QueryBuilder equivalent, like CASE, etc. If you absolutely need to support that in the query you might have to do a straight $db->query() call (using bindings of course!), unless you can manage to make that part of a select or something which you don't escape, which you would need to be very careful with before using to make sure you didn't pass unescaped user data into.
Reply


Messages In This Thread
RE: Call to undefined function CAST() - by kilishan - 04-02-2019, 06:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB