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

(This post was last modified: 07-11-2020, 05:48 PM by John_Betong.)

@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.
Reply


Messages In This Thread
RE: CI4 - > MySQLI Database -> query return result object even if error - by John_Betong - 07-11-2020, 05:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB