Are you just trying to get the desc from procedures scheduled for said
doctor? I think all you need is something like this:
'select p.description from procedures p, fee_schedules fs where
p.id=fs.procedure_id and fs.doctor_id=$doctorid [and fs.id is null];'
I don't really understand the 'id is null' part, couldn't you then just
select description from procedures where id is null and get the same thing?
I must admit I don't really understand joins unless it does the same thing
as the above query. Anyway, does that help any?

* Daniel Crookston [Sat, 10 Jan 2004 at 19:43 -0700]
<quote>
> Does anyone know how to combine these two MySQL queries into one?
> 
> create temporary table tmp_fs select * from fee_schedules where doctor_id=2;
> 
> select description from procedures left join tmp_fs
>   on tmp_fs.procedure_id = procedures.id
>   where tmp_fs.id is null;
> 
> If you want to see the tables and some sample data, they're both here:
> http://www.hyperion-data.net/dbstuff.html
> 
> I'm not using 4.1 so subselects aren't an option, sadly.
> 
> Dan
> 
> 
> ____________________
> BYU Unix Users Group 
> http://uug.byu.edu/ 
> ___________________________________________________________________
> List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
</quote>

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to