Q: How to select with except code in Code Igniter this is what I want in SQL: select id from mytable except select id from another_table,
but with CI's database library to use EXCEPT function,
how do I obtain it?

A: You can accomplish this using NOT EXISTS
SELECT
    MT.id
FROM
    mytable AS MT
WHERE NOT EXISTS (
    SELECT
        AT.id
    FROM another_table AS AT 
    WHERE AT.id = MT.id
)

