Using Typecast in Query Builder or Query |
Hello all, I'm having a problem when trying to typecast a value in my Postgres's DB wich is type TEXT to INT to perfom a Order By in a query.
When trying to use the standart QUERY() function I receive errors if I try using "ORDER BY option::int" PHP Code: $query_options = $this->query("SELECT * FROM integrador_ura_options WHERE fk_ura_id = ? ORDER BY option::int", $fk_ura_id); <b>Fatal error</b>: Uncaught CodeIgniter\Format\Exceptions\FormatException: Failed to parse json string, error: "Type is not supported". in /var/www/html/integrador/system/Format/Exceptions/FormatException.php:9 And i didn't find any documentation about how to do it using QueryBuilder class. |
Messages In This Thread |
Using Typecast in Query Builder or Query - by GuilhermeBiz - 04-12-2019, 06:19 AM
RE: Using Typecast in Query Builder or Query - by donpwinston - 04-12-2019, 06:39 AM
RE: Using Typecast in Query Builder or Query - by GuilhermeBiz - 04-12-2019, 09:46 AM
|