Search our cast lists to see if someone you know is in a show
Enter a partial name and click on Search
(Don’t worry about upper or lower case)
[insert_php]
$parms = “yes”;
$name = “‘” . $_GET[‘person’] . “‘”;
if ($name == “””) {$parms = “no”;}
if ($parms == “yes”) {
$parm1 = str_replace(“‘”,””,$name) ;
$parm1 = str_replace(“~”,” “,$parm1);
$parm1 = “‘%” . $parm1 . “%'” ;
$parm2 = “now”;
$type = “‘” . $_GET[‘type’] . “‘”;
if ($type == “‘all'”) {$parm2 = “all”;}
$perfparm = “Back“;
$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 ($parm2 == “all”) {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 order by Type”;
}
else {
$sql = “SELECT Cast.Type, Cast.Role, Cast.Name, Performances.ShowName, Performances.Venue, Performances.Opens, Performances.Closes, Performances.Production from `Cast`
INNER JOIN Performances
ON Cast.Production = Performances.Production
where Name like $parm1 and Closes >= ‘$today’ order by Type”;
}
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// print header
echo “
Name | Role | Show | Dates |
” . $personparm . $row[“Name”] . “” . “ | ” . $row[“Role”] . “ | ” . $showparm . $row[“ShowName”] . “” . “ | ” . $persparm . $dates . “ |
“;
$mysqli->close();
}
[/insert_php]