Search
if ($_POST["jt_string"] && $_POST["jt_mode"])
{
// Display results of searching database for given string.
$string = $_POST["jt_string"];
$mode = $_POST["jt_mode"];
?>
Search Results
Searched weblog gallery all of jamietalbot.com for ““.
gallery_open_db();
if ($mode == "blog" || $mode == "both")
{
?>
Blog Entries
// Display blog results.
$query = mysql_query("SELECT post_title, post_name, DATE_FORMAT(post_date, '%Y/%m/%d/') AS date FROM wp_posts WHERE post_title LIKE '%$string%' OR post_content LIKE '%$string%'") or die (mysql_error());
if (!($count = mysql_num_rows($query)))
{
?>
Sorry, no matches found for ““.
}
else
{
echo "
$count blog “;
if ($count == 1) echo “entry “; else echo “entries “;
?>
found for ““.
-
while ($posts = @mysql_fetch_array($query))
- “>
{
$date = $posts["date"];
$postname = $posts["post_name"];
?>
}
?>
}
}
?>
if ($mode == "gallery" || $mode == "both")
{
// Display picture results.
?>
Gallery
// Display gallery results.
$query = mysql_query("SELECT DISTINCT gallery_categories.name AS catname, gallery_subcategories.name AS subcatname, gallery_categories.internalname AS catinternal, gallery_subcategories.internalname AS subcatinternal FROM gallery_subcategories LEFT JOIN gallery_categories USING (categoryID) WHERE MATCH (gallery_subcategories.name, gallery_subcategories.description) AGAINST ('$string') OR MATCH (gallery_categories.name, gallery_categories.description) AGAINST ('$string')") or die(mysql_error());
if (!($count = mysql_num_rows($query)))
{
?>
Sorry, no category or subcategory matches found for ““.
}
else
{
echo "
$count category / subcategory “; if ($count == 1) echo “entry “; else echo “entries “; ?>found for ““.
-
while ($gallery = @mysql_fetch_array($query))
- //”>
{
$catname = $gallery["catname"];
$subcatname = $gallery["subcatname"];
$catinternal = $gallery["catinternal"];
$subcatinternal = $gallery["subcatinternal"];
?>
}
?>
}
$query = mysql_query("SELECT DISTINCT title, gallery_photo.photoID AS id, gallery_photo.description AS description, gallery_categories.name AS catname, gallery_subcategories.name AS subcatname, gallery_categories.internalname AS catinternal, gallery_subcategories.internalname AS subcatinternal FROM (gallery_photo LEFT JOIN gallery_subcategories USING (subcategoryID)) LEFT JOIN gallery_categories USING (categoryID) WHERE MATCH (title, gallery_photo.description) AGAINST ('$string')") or die(mysql_error);
if (!($count = mysql_num_rows($query)))
{
?>
Sorry, no photo matches found for ““.
}
else
{
echo "
$count gallery “; if ($count == 1) echo “photo “; else echo “photos “; ?>found for ““.
-
while ($gallery = @mysql_fetch_array($query))
- ” alt=”” title=”” />
{
$title = $gallery["title"];
$id = $gallery["id"];
$description = $gallery["description"];
$catname = $gallery["catname"];
$subcatname = $gallery["subcatname"];
$catinternal = $gallery["catinternal"];
$subcatinternal = $gallery["subcatinternal"];
?>
}
$searchcontent = 1;
?>
}
?>
New Search
Didn’t find what you were looking for? Try again…
Enter search terms in the box below and select search mode.