I've been debugging for days how to resolve a !==
issue between two values. Turns out it failed because it shows up as a string instead of a int like defined in the database.
Here it shows as int:
But when using it, it's being defined as string
:
var_dump($dbinfo['tmdb_revision']) . '<br>'; // the value from the database
var_dump($api[1]['tmdb']['revision']); // the dynamic value I compare the db value with
Results as:
string(1) "7"
int(7)
I can use
(int)$dbinfo['tmdb_revision']
But that seems weird because it's defined as int in the database and rather use that definition.
Is this a known issue and how can I resolve it?
$dbinfo is defined like so:
$titlecheck = $this->query("SELECT * FROM titles WHERE tmdb_name=:name AND tmdb_titleid=:skuid");
if($titlecheck->execute(array(":name" => $api[1]['tmdb']['name'], ":skuid" => $api[1]['tmdb']['titleid']))) {
$dbinfo = $titlecheck->fetch(PDO::FETCH_ASSOC);
// code starts here