activerecord - CodeIgniter Nested Query -


i have piece of code getting conferences database, specific subscriber not subscribed.

i have 2 tables:

  • conferences - holds conferences
  • read - holds subscriber conferences

here code, mysql 1064 error.

function getpossibleconferencesofsubscriber($sub_id) {        $a = "select * conference c c.issn not in (select issn read sub_id=$sub_id)";                                                                          $query = $this->db->query($a);     return $query->result(); }     

ok, found problem. guess "read" command, mysql confuses table name read , command read. hope helps someone, saves 1 hour.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -