Help rewriting sql line please |
[eluser]RJ[/eluser]
Code: $sel = "SELECT * FROM wptransactions WHERE active='y' AND (ifind_msisdn = '".$this->msisdn."' or m_tt_msisdn='".$this->msisdn."' or trimtrac_msisdn = '".$this->msisdn."')"; I have Code: $arr = array(ifind_msisdn,m_tt_msisdn,trimtrac_msisdn); But I know that's not right. Any thoughts? Thank you! Edit: actually i could use help with this one as well ;| Code: $sel = "SELECT devicetype, TO_CHAR(subversion) FROM ttdevice WHERE msisdn = '".$MSISDN."' AND unitid = '".$UNITID."'"; The TO_CHAR I'm not sure who to build string including that.
[eluser]Armchair Samurai[/eluser]
Number one Code: $msisdn = $this->db->escape($this->msisdn); Number two Code: $this->db->select('devicetype');
[eluser]RJ[/eluser]
Hey I'm getting this error when running the second query. Quote:Fatal error: Call to undefined method Shop::_remove_invisible_characters() in D:\data\Inetpub\wwwweb_verynew\s\system\database\drivers\odbc\odbc_driver.php on line 248 Any idea why? I changed the code slightly to reflect correct database: Code: $TT = $this->load->database('trimtrac', TRUE); Not sure why its erroring on a non-existing method, this is the odbc driver code, erroring on the return line: Code: function escape_str($str)
[eluser]RJ[/eluser]
Commented out the return line, changed to true. not sure what negative effect that could have, but the error is non-existent.
[eluser]RJ[/eluser]
Moved thread to this discussion, can not get values into where statement; only '1'?? http://ellislab.com/forums/viewthread/111949/ |
Welcome Guest, Not a member yet? Register Sign In |