[eluser]rvent[/eluser]
Well i have this new test function in my controller
Code:
$chkPart = $this->SmtJob->isPart(); //queries DB to check is part is unique
if ($chkPart == '100022810')
{
echo 'its true';
}
else
{
echo 'its false';
}
and this on my model
Code:
$part = '100022810';
$sqlChk = "SELECT PartNumber FROM PartNumber
WHERE PartNumber = ? LIMIT ?";
$getPart = $this->db->query($sqlChk, array($part, 1));
echo "-- model says: -- $getPart --]";
return $getPart;
and i cant seem to get the result from the query. I get this on the page reload
Code:
-- Part -- TEST1 --]
A PHP Error was encountered
Severity: 4096
Message: Object of class CI_DB_mysql_result could not be converted to string
Filename: Boards/smtJob.php
Line Number: 52
-- model says: -- --]its false
Line 52 is the echo line in the model...
What am i missunderstanding...? shouldnt i be getting the value...? i am possitive that the value exist in the DB.. Thats where i got it from...
Any ideas..?
Thanks