Exemplo n.º 1
0
$last_modified_on = $language['last_modified_on'];
// tams_talent_photos
$mysql8 = 'SELECT * FROM tams_talent_photos WHERE talent_id ="$talent_id"';
$photo = DB::queryFirstRow($mysql8);
$talent_photo_id = $photo['talent_photo_id'];
$photo_path = $photo['photo_path'];
$photo_caption = $photo['photo_caption'];
$created_on = $photo['created_on'];
$created_by = $photo['created_by'];
$last_modified_by = $photo['last_modified_by'];
$last_modified_on = $photo['last_modified_on'];
$talent = DB::queryFirstRow($sql);
////print_r($talent);
//Basic Information
$talent_full_name = $talent['first_name'] . ' ' . $talent['last_name'];
$sex = get_talent_gender($talent_id);
if (is_null($sex) or $sex == "") {
    $sex = " - not set - ";
}
if (is_null($talent['dob']) or $talent['dob'] == "0000-00-00") {
    $age = " - not set - ";
    $dob = " - not set - ";
} else {
    $age = getAge($talent['dob']);
}
$nationality = $talent['nationality'];
if (is_null($nationality) or $nationality == "") {
    $nationality = " - not set - ";
}
$brief = $talent['brief'];
if (is_null($brief) or $brief == "") {
Exemplo n.º 2
0
     $db = mysqli_connect("localhost", "root", "", "teamsutlej_talent") or die('I cannot connect  to the database because: ' . mysql_error());
     //-select  the database to use
     /*  $mydb=mysql_select_db("teamsutlej_talent"); */
     //-query  the database table
     $sql = "SELECT talent_id, first_name, last_name , nationality , dob , sex , eye_color ,height_cm FROM tams_talent WHERE  first_name LIKE '%" . $find . "%' OR last_name LIKE '%" . $find . "%' OR nationality LIKE '%" . $find . "%' OR dob LIKE '%" . $find . "%'  OR sex LIKE '%" . $find . "%' OR eye_color LIKE '%" . $find . "%' OR height_cm LIKE '%" . $find . "%'";
     //-run  the query against the mysql query function
     $talent = DB::queryFirstRow($sql);
     $result = mysqli_query($db, $sql);
     //-create  while loop and loop through result set
     $html = "";
     while ($row = mysqli_fetch_array($result)) {
         echo "<div>" . $row['first_name'] . "</div>";
         echo "<div>" . $row['last_name'] . "</div>";
         echo "<div>" . $row['nationality'] . "</div>";
         echo "<div>" . getAge($row['dob']) . "</div>";
         echo "<div>" . get_talent_gender($row['talent_id']) . "</div>";
         echo "<div>" . $row['eye_color'] . "</div>";
         echo "<div>" . $row['height_cm'] . "</div>";
         echo "<br/>";
         //-display the result of the array
         //  echo "<p><span><h4>" .$row['first_name']."".$row['last_name']."</h4></span>"
         //	."<span><h4>".$row['dob']."</h4></span>".
         //	"<span><h4>".$row['nationality']."</h4></span>".
         // 	"<span><h4>".$row['height_cm']."</h4></span>"."</p>";
         // echo "<ul>\n";
         // echo "<li>" . "<a  href =".$_SERVER['PHP_SELF']."?route=modules/talent/view_talent_profile&talent_id=".$talent['talent_id'].">" . $first_name . " " . $last_name ." ". $nationality . " " . $height_cm . " " . $dob . " " . $eye_color . " " . $sex . "</a></li>\n";
         // echo "</ul>";
     }
 } else {
     echo "<p>Please enter a search query.</p>";
 }