I have two PHP variables in a class that are integers ($id and $descCode).
I'm trying to get these into my SQL function call as characters (the database is looking for these to be CHAR 2
and CHAR 10
respectively).
For some reason, this is triggering an error:
Use of parameter marker or NULL not valid
What exactly am I doing wrong here?
$results = array();
$results = $db->select("SELECT newCodeTest(:id,:desc) as newCode FROM testTable",
[
'id' => (string)$id,
'desc' => (string)$descCode
]
);