Example #1
0
function convert($dbFileName, $sqlFileName)
{
    $db = get_pdo($dbFileName);
    $f = get_file($sqlFileName);
    convert_data($db, $f, convert_schema($db, $f));
    fclose($f);
}
Example #2
0
<!--Search-->
<form action="" method="GET">
<div class = "buttons">
<textarea name="query" cols="60" rows="1"></textarea><br />
<br>
<input type="submit" value="Submit"/>
</div>
<style type="text/css">
.buttons{text-align: center;}
</style>
<?php 
if ($_GET["query"] == "") {
} else {
    if ($_GET["query"] != "") {
        require_once 'global_functions.php';
        $pdo_obj = get_pdo();
        echo "<br><br><b>The actor/movie you're searching for is: </b></br> </br>";
        echo $_GET["query"];
        echo "<br><br>";
        $search = $_GET["query"];
        $trimmedSearch = trim($search, " \t.");
        $queryMovie = 'SELECT id,title FROM Movie WHERE title LIKE "%';
        $queryActor = 'SELECT id,first,last FROM Actor WHERE first LIKE "%';
        $queryActor2 = 'SELECT id,first,last FROM Actor WHERE last LIKE "%';
        /*
        	if (!preg_match("/^[0-9a-zA-Z ]*$/",$trimmedSearch)) {
               echo "Only numbers, letters and white space allowed"; 
             }*/
        //echo "Revised search is: ";
        //echo $trimmedSearch;
        //echo "<br><br>";