rapaport
Members-
Content Count
12 -
Joined
-
Last visited
About rapaport
-
Rank
Newbie [Level 1]
-
Php/mysql Search Engine Help Having issues displaying results
rapaport posted a topic in Programming
I've been using a tutorial (https://www.devarticles.com/c/a/MySQL/Developing-A-Site-Search-Engine-With-PHP-And-MySQL/) at this address to help me get started on building my own search engine. I've completed the tutorial but when I run the search, I get no results on the results page. I'm wondering if anyone will take a look at this script and see if they can figure out why my I'm not getting any results displayed. I'm using phpMyAdmin to build the database and simple notepad to build the PHP script. <?php$submit = $_POST["submit"];$keywords = $_POST["keywords"];if(isset($submit) || isset($keywords)){doSearch($keywords);}else{getKeywords();}function getKeywords(){?><html><head><title> Enter Search Keywords </title></head><body bgcolor="#FFFFFF"><form name="frmKW" action="searchdocs.php" method="post"><h1>Keyword Search</h1>Enter keywords to search on:<input type="text" name="keywords" maxlength="100"><br><br><input type="submit" name="submit" value="Search"></form></body></html><?php}function doSearch($search_keywords){$arrWords = explode("", $search_keywords);if(sizeof($arrWords) == 0 || $search_keywords == ""){echo "You didn't enter any keywords<br>";echo "<a href='searchdocs.php'>Go Back</a>";}{// Connect to the database$dServer = "localhost";$dDb = "content";$dUser = "x";$dPass = "x";$s = @mysql_connect($dServer, $dUser, $dPass)or die("Couldn't connect to database server");@mysql_select_db($dDb, $s)or die("Couldn't connect to database");for($i = 0; $i < sizeof($arrWords); $i++){$aQuery = "select articleId, title, left(content, 100) as summary from articles where articleId = " . $arrWhere;$aResult = mysql_query($aQuery); $count = 0;$articles = array();if(mysql_num_rows($aResult) > 0){while($aRow = mysql_fetch_array($aResult)){$articles[$count] = array ("articleId" => $aRow["articleId"],"title" => $aRow["title"],"content" => $aRow["content"]);$count++;}}$result = mysql_query($query);if(mysql_num_rows($result) > 0){// Get the id's of the articles$row = mysql_fetch_array($result);$arrIds = explode(",", $row[0]);$arrWhere = implode(" OR articleId = ", $arrIds);echo "<h1>" . sizeof($articles);echo (sizeof($articles) == 1 ? " article" : " articles");echo " found:</h1>";foreach($articles as $a => $value){?><a href="article.php?articleId=<?php echo $articles[$a]["articleId"]; ?>"><b><u><?php echo $articles[$a]["title"]; ?></u></b></a><br><?php echo $articles[$a]["summary"] . "..."; ?><br><a href="article.php?articleId=<?php echo $articles[$a]; ?>">[url=http://forums.xisto.com/no_longer_exists/; echo $articles[$a]["articleId"]; ?></a><br><br><?php}}else{echo "No results found for '$search_keywords'<br>";echo "<a href='searchdocs.php'>Go Back</a>";}}}}?> The database has 2 tables (articles and searchWords) with 3 fields each ((ArticleID, title, content) and (WordID, Word and ArticleIDs). Each table has 2 records I know this is a long script and this post maybe asking a lot, but I've gone over the tutorial several times and can't seem to indentify the difference in either my database structure or my PHP script. All help is appreciated as well as more tutorials for building a MySQL/PHP driven search engine, if anyone knows any. Thank you. Notice from snlildude87: 50% OF YOUR POST WAS CODE!! Use the code box whenever posting code. *Edited and warned.* -
Who makes the computer? Was it "custom" built? As in, did who ever you bought it from make it with scrap parts? If that's the case, often times random pieces of hardware are not compatible with each other. Or if they are, only for a limited time as the stress of interacting with the strange hardware stresses the hardware until they all fry. That's all I can help you with.How come you're paying so much for an older computer, anyway? Desktops from all the major manufacturers have dropped well below 1000USD in the past few years.
-
I've established an Apache 2.0 server on my laptop that I want to use to test new features of my website before I make them public.I'm nervous about security and random attacks and just want to feel assured knowing that no one can access my Apache server remotely.I'm running Windows XP and have Windows firewall protection enabled. Is that enough? What types of changes do I need to makes to the "conf/httpd" configuration or other files in the Apache directory?Basically, what settings do I need to enable to restrict all remote access to the localhost Apache server on my computer?I've been running google searches for the past hour of "apache secure windows" and variations but I havent found anything that works. Any help is appreciated.
-
Wikipedia: "The station existed until March 23, 2001, at which point it was deliberately de-orbited and broke apart during atmospheric re-entry." Hopefully, the US can get its shuttles back into space so we can keep the ISS operational, and moreover finish its construction.
-
Here are the CC I remember playing (as in the US (or some amalgation of allied states) vs the "rogue": Tiberian Sun, the one with Yori (Russia), China, Middle East. Age of Empires I and II and Rise of Nations. Rise of Nations gives you real combat capabiltity with modern weapons (tank, rpg, machine gun) through long epochs that can be advanced quickly. If you want to get to the modern age with cities and tank warfare, etc. then you can advance through more primitive weapon stages quickly with the right game settings. Also there's economic micromanagement more expansive than mining "ore." (Iron, Stone, Gold, Oil, Lumber, Food (Livestock, Farming, Fishing)Rise of Nations can even get more complex than you can manage. If you expand too fast too quick you can lose track of your cities then get picked off by barbarians and other CPU states (depending on difficulty). My suggestion, try Rise of Nations if you're into RTS games, and think you may have exhausted everything else, or are looking for something new anyway.
-
Running a simple search "change hotmail password" in the MSN search bar might help. You could even search that in Google, too. Also, navigating through the "options" tab in the hotmail homepage should lead you to an "account settings" tab that you should be able to find options to change your password.
-
Is This Illegal? Music and Internet
rapaport replied to fsastraps's topic in Websites and Web Designing
Seems to me like streaming your files is the way to go. For that, you might want to check out the Free Bandwidth Project (freebandproject.com). They offer free file caching (not storage) so you'd have a free resource from which to stream all your media content. Your site sounds interesting. What kind of music are you wanting to post? Popular/mainstream or underground bands trying to break out? -
Vista (spanish) = View (english)ie.: buena vistaIronic that Microsoft would name this OS "view," since it seems like their is some deep suspicions that Microsoft might just be out to get a sweet vista on the inner workings of your most private computer details.I'm not really concerned about Microsoft seeing everything that was happening on my computer when the OS crashed, In reality, its probably good for the development of whatever Service Pack Microsoft will undoubtedly end of releasing to re-secure its "Most Secure Operating System Ever!" Frankly, I'm more concerned that they're dumping the information into a repository that might be maliciously targeted by hackers, scammers, phishers, etc. Microsoft has too much to lose by "spying" on its customers. I think this is a bit of over-hyped scare tactics by some anti-Microsoft-ers.
-
I was looking for any type of web hosting (paid/free) and I came up on the Open Directory Project which is a site of catalogued links grouped by topic and then divided into sub-topics. Very useful for finding links to almost anyting I assume (I just stuck to the computer section, but they had thousands of catalogued links under various computer sub-topics).Anyway, that's how I found Xisto, on the Open Directory Project website.
-
I use a 256MB stick made by Geek Squad. It proves its usefulness time and time again.I store important documents I don't want to risk losing in a crash/virus/act of godI transport files between computers seemlessly. My laptop has no floppy so its either CD-R or email, or buying an external floppy (no thanks).While I hardly use more than 1MB for permanent storage, the extra 250MB makes transfering large files simple. If you don't have a USB memory stick, you will. Who knows, anyone think they could replace the CD/DVD-ROM? They seem more durable, capable of more storage and are much smaller. Plus, they can wiped and reformatted infinite times (barring spontaneous combustion).
-
I know I had one before, pretty sure an older IBM 386, but the one I remember is an old Gateway 2000 486 Pentium that ran Windows 3.1. It sat flat on our desk and had a floppy and CD. I begged my parents for a zip drive when I realized how many things I could store on that one super-size floppy.The IBM ran on DOS and had a 5.2 Floppy that I could play puzzle solving games and reader rabbit. It chirped really loudly because it didnt have speakers and the sound card (whatever it was) was internal. I think the IBM was from when I was 8 or 9 and the Gateway 11-13. I was too young to remember any more details.