<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Mike Holden wrote:
<blockquote
cite="mid:365892ca89468832df02aaa6422ec43d.squirrel@www.mikeholden.org"
type="cite">
<pre wrap="">Paul wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm trying to setup a schedule for actor = 'Will Smith' and category =
'film' (I've seen most of the fresh prince. I found a page on the wiki
- <a class="moz-txt-link-freetext" href="http://www.mythtv.org/wiki/Custom_Recording">http://www.mythtv.org/wiki/Custom_Recording</a> that suggests;
* Additional tables = "JOIN credits AS c ON c.chanid=program.chanid
AND c.starttime=program.starttime JOIN people AS p ON
p.person=c.person"
* Search phrase = "p.name = 'Will Smith' AND program.category_type =
'Film'"
However, when i try this (from mythweb) I get a SQL error around the
additional tables part. My system is running on Mythbuntu Karmic (9.10)
and Myth 0.22. I can succesfully run it as pure SQL;
</pre>
</blockquote>
<pre wrap=""><!---->
What error message are you getting?
Have you tried it from the frontend rather than mythweb?
</pre>
</blockquote>
I ahven't tried this from a frontend (I find setting up searches easier
via mythweb). From mythweb I get a (very long) SQL error message<br>
<br>
Error:<br>
There is an error in your custom SQL query:<br>
<br>
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'JOIN credits AS c ON c.chanid=program.chanid
AND c.starttime=program.starttime J' at line 1 [#1064]<br>
<br>
Backtrace<br>
Array<br>
(<br>
[0] => Array<br>
(<br>
[file] =>
/usr/share/mythtv/mythweb/classes/Database/Query/mysql.php<br>
[line] => 85<br>
[function] => error<br>
[class] => Database<br>
[object] => Database_mysql Object<br>
(<br>
[dbh] => Resource id #18<br>
[error] => You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'JOIN credits AS c ON c.chanid=program.chanid
AND c.starttime=program.starttime J' at line 1 [#1064]<br>
[err] => You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'JOIN credits AS c ON c.chanid=program.chanid
AND c.starttime=program.starttime J' at line 1<br>
[errno] => 1064<br>
[last_sh] => Database_Query_mysql Object<br>
(<br>
[dbh] => Resource id #18<br>
[query] => Array<br>
(<br>
[0] => SELECT NULL FROM program,
channel, JOIN credits AS c ON c.chanid=program.chanid AND
c.starttime=program.starttime JOIN people AS p ON p.person=c.person
WHERE p.name = 'Will Smith' AND program.category_type = 'Film'<br>
)<br>
<br>
[last_query] => SELECT NULL FROM
program, channel, JOIN credits AS c ON c.chanid=program.chanid AND
c.starttime=program.starttime JOIN people AS p ON p.person=c.person
WHERE p.name = 'Will Smith' AND program.category_type = 'Film'<br>
[warnings] => Array<br>
(<br>
)<br>
<br>
[num_args_needed] => 0<br>
[num_rows] => <br>
[affected_rows] => -1<br>
[insert_id] => 0<br>
[db] => Database_mysql Object<br>
*RECURSION*<br>
[sh] => <br>
)<br>
<br>
[fatal_errors] => <br>
[query_count] => 156<br>
[query_time] => 0.0633826255798<br>
[global_name] => db<br>
........<br>
</body>
</html>