Welcome Guest, Not a member yet? Register   Sign In
CI4 - > MySQLI Database -> query return result object even if error
#6

(07-11-2020, 05:47 PM)John_Betong Wrote: @johannes,
> I did a test to see the Database objects and how the handle invalid queries. The logic is that if
the database query does not return a valid result that false is returned else the resource id is returned via the CI

I have never liked the practise of functions returning two different result types. I hope this bad practise will soon have alternatives which only allow valid strict_type return values.

Using type-casting ensures the return types are always the same and the function result must be checked for validity.

Good day @John_Betong , luckily as you can see in my last post I have realized that I was wrong on the return type
as the Base class did the conversion to ensure that the type returned is valid return type that is not a mix match , thus this at least
was addressed and explains why the result object was returned that I did not expect but now understand, it also explained like that
in their documents (the first place I should have checked)
Reply


Messages In This Thread
RE: CI4 - > MySQLI Database -> query return result object even if error - by johannes - 07-12-2020, 09:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB