Search our cast lists to see who has played a role in a show you are casting
Enter a partial role name and/or a partial show name then click on Search. Role could be a character name or a production role (e.g. director, musical director, choreographer, producer, stage manager). Don’t worry about upper or lower case.
[insert_php]
$parms = “yes”;
$role = “‘” . $_GET[‘role’] . “‘”;
$show = “‘” . $_GET[‘show’] . “‘”;
if ($role == “”” and $show == “””) {$parms = “no”;}
if ($parms == “yes”) {
$parm1 = str_replace(“‘”,””,$role) ;
$parm1x = $parm1;
$parm1 = “‘%” . $parm1 . “%'” ;
$parm2 = str_replace(“‘”,””,$show) ;
$parm2x = $parm2;
$parm2 = “‘%” . $parm2 . “%'” ;
// CAST SEARCH
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$today = date(“Y-m-d”);
if ($role <> “”” and $show <> “””) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Role like $parm1 and ShowName like $parm2 and Cast.Type != ‘Production’ order by ID, Role, Opens DESC “;
}
elseif ($role <> “”” ) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Role like $parm1 and Cast.Type <> ‘Production’ order by ID, Role, Opens DESC”;
}
elseif ($show <> “”” ) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where ShowName like $parm2 and Cast.Type != ‘Production’ order by ID, Role, Opens DESC”;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
echo “Results for Role= ” . $parm1x . “ and Show = ” . $parm2x . “ “;
echo “
Cast
“;
// print header
echo “
Role | Name | Show | Company |
” . $row[“Role”] . “” . “ | ” . $persparm . $row[“Name”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
“;
$mysqli->close();
// PRODUCTION SEARCH
$mysqli = new mysqli(‘localhost’, ‘lictc_user’, ‘lictc’, ‘lictc’);
if ($mysqli->connect_error) {
die(‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘
. $mysqli->connect_error);
}
$today = date(“Y-m-d”);
if ($role <> “”” and $show <> “””) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Role like $parm1 and ShowName like $parm2 and Cast.Type = ‘Production’ order BY Field (Role,’Casting Director’, ‘Stage Manager’,’Choreographer’,’Music Director’,’Musical Director’,’Assistant Director’, ‘Director’,’Producer’) DESC, ID, Opens DESC”;
}
elseif ($role <> “”” ) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Role like $parm1 and Cast.Type = ‘Production’ order BY Field (Role,’Casting Director’, ‘Stage Manager’,’Choreographer’,’Music Director’,’Musical Director’,’Assistant Director’, ‘Director’,’Producer’) DESC, Name, Opens DESC”;
}
elseif ($show <> “”” ) {
$sql = “SELECT Cast.ID, Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production, Performances.Company from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where ShowName like $parm2 and Cast.Type = ‘Production’ order BY Field (Role,’Casting Director’, ‘Stage Manager’,’Choreographer’,’Music Director’,’Musical Director’,’Assistant Director’, ‘Director’,’Producer’) DESC, ID, Opens DESC”;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
echo “Results for Role= ” . $parm1x . “ and Show = ” . $parm2x . “ “;
echo “
Production Team
“;
// print header
echo “
Role | Name | Show | Company |
” . $row[“Role”] . “” . “ | ” . $persparm . $row[“Name”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $comp . “ |
“;
$mysqli->close();
}
[/insert_php]