[mythtv-users] Mythbackend gives sql error

Ben Rometsch ben at solidstategroup.com
Sun May 9 21:48:20 EDT 2004


MySQL 4.1 has support for subqueries, but that is still in Beta. It 
looks like there is a semi-colon ( ; ) missing in that query. That would 
break the query up into two seperate queries...

So this:

SELECT serviceid, networkid, providerid, transportid, frequency, 
inversion, symbolrate, fec, polarity, diseqc_type, diseqc_port, 
lnb_lof_switch, lnb_lof_hi, lnb_lof_lo FROM dvb_channel, dvb_sat  WHERE 
dvb_channel.satid=dvb_sat.satid AND chanid='20'SELECT satid FROM 
dvb_channel WHERE chanid='20'

Would become

SELECT serviceid, networkid, providerid, transportid, frequency, 
inversion, symbolrate, fec, polarity, diseqc_type, diseqc_port, 
lnb_lof_switch, lnb_lof_hi, lnb_lof_lo FROM dvb_channel, dvb_sat  WHERE 
dvb_channel.satid=dvb_sat.satid AND chanid='20';
SELECT satid FROM dvb_channel WHERE chanid='20';

That "looks" more correct to me. I cant guarantee if it is the intended effect of what you are after, but it is certainly more valid...

Ben

----== Solid State Group ==----
Web     www.solidstategroup.com
Email   ben at solidstategroup.com
MSN     benrometsch at hotmail.com



Peter Valdemar Morch wrote:

> Michael Gargiullo gargiullo-at-comcast.net |Lists| wrote:
>
>> The error may displayed may not be the entire sql query, but from what I
>> see, this is a generic MySQL error due to the formatting of the
>> sub-query.
>
>
> As far as I recall, the mysql-3.23.58-4 I'm running doesn't support 
> subqueries at all (pretty sure about that, but not 100%). Also the 
> missing space between '20' and SELECT is odd, isn't it?
>
> "...AND chanid='20'SELECT satid..."
>
> Peter 



More information about the mythtv-users mailing list