i guess my thought process is wrong somewhere, but i cant seem to figure it out.
I have these two tables
pic_lpic (pic_lpic_num mediumint auto increment..., pic varchar(7), lpic varchar(7));
voice_circuit_has_pic_lpic (circuit_id varchar(20), pic_lpic_num mediumint);
i want to see everything in table pic_lpic in which the pic_lpic_num is not included in a query of of the voice_circuit_has_pic_lpic table with a given circuit_id.
basically, here is the query i have tried.
$query = "SELECT pic_lpic_num, pic, lpic FROM pic_lpic WHERE pic_lpic_num != some (SELECT pic_lpic_num FROM voice_circuit_has_pic_lpic WHERE circuit_id = '$circuit_id')";
you can see, i just want everything from the pic_lpic table where the pic_lpic_num doesnt equal those pic_lpic_num's in the inner query.
where am i going wrong with this?
it is just returning everything in the pic_lpic table. it doesnt filter anything out.
i know its a stupid mistake and ive just been staring at my computer for too long.