[eluser]Sub-Zero[/eluser]
Hi!
I have created a controller that is doing this:
Example:
=================
function sample($valid){
$this->load->model('Db_sample_model', 'dbsample');
$othervalue = $this->dbsample->getothervalue($valid);
$results = $this->dbsample->getresults($othervalue, $valid);
==================
Here is an example of the sql statement for the model getothervalue >>
function getothervalue($valid){
$thevalue = $this->db->query("select value2 from table where value1 = '$valid'");
return $thevalue;
}
I did some printouts inside getothervalue, getresults and in the controller and was able to see the value of $valid. Dunno why I can't see or get the value of $othervalue - looks like I'm passing NULL. Any comments?
p.s. value1 and value2 are varchar...