search

PHP - Matching search terms mysql_query

不打扰是莪最后的温柔 提交于 2019-12-25 07:49:54
问题 im having issue with a php script that retrieves values from a database and see's which ones match an input term. I either get the resourceID #4 error or no response. Im basically trying to retrieve similar entries and of those similar entries show the name and date of their submission $input = mysql_real_escape_string($_POST["interest"]); $query1 = "SELECT name,interest_desc,date, MATCH(interest_desc) AGAINST('$input') AS score FROM interests WHERE MATCH(interest_desc) AGAINST('$input')

I use $_POST and index is undefined?

时间秒杀一切 提交于 2019-12-25 07:47:45
问题 I am using the code show below for a search and it is working. But when I try it to display another page with other results it says that “the index is undefined". I'm using again in this file but it does not solve anything. Can anyone tell me why is this happening? The error is: Notice: Undefined index: pesquisa in J:\xampp\htdocs\pesquisa3.php on line 32 The code is: <?php session_start(); if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) { header ("Location: login.php"); } ?>

PHP Twitter Hashtag Search showing no results in parse but data present in array

拜拜、爱过 提交于 2019-12-25 07:29:04
问题 <?php require_once('TwitterAPIExchange.php'); /** Set access tokens here - see: https://dev.twitter.com/apps/ **/ $settings = array( 'oauth_access_token' => "HIDDEN FOR STACK ASSIST", 'oauth_access_token_secret' => "HIDDEN FOR STACK ASSIST", 'consumer_key' => "HIDDEN FOR STACK ASSIST", 'consumer_secret' => "HIDDEN FOR STACK ASSIST" ); // Your specific requirements $url = 'https://api.twitter.com/1.1/search/tweets.json'; $requestMethod = 'GET'; $getfield = '?q=#trekconspringfield&result_type

PHP Twitter Hashtag Search showing no results in parse but data present in array

雨燕双飞 提交于 2019-12-25 07:28:26
问题 <?php require_once('TwitterAPIExchange.php'); /** Set access tokens here - see: https://dev.twitter.com/apps/ **/ $settings = array( 'oauth_access_token' => "HIDDEN FOR STACK ASSIST", 'oauth_access_token_secret' => "HIDDEN FOR STACK ASSIST", 'consumer_key' => "HIDDEN FOR STACK ASSIST", 'consumer_secret' => "HIDDEN FOR STACK ASSIST" ); // Your specific requirements $url = 'https://api.twitter.com/1.1/search/tweets.json'; $requestMethod = 'GET'; $getfield = '?q=#trekconspringfield&result_type

Efficient search for words in string

ⅰ亾dé卋堺 提交于 2019-12-25 07:06:33
问题 I have a dictionary containing a list of words and I have a string URL. I want to find all the words contained in the URL after it has been decomposed into tokens using delimiters. Right now, I am testing for each word in the dictionary against each tokens greater than a certain number (using java's String contains function). For example, I search for words like "ground" in wunderground for www.wunderground.com I am sure there is a more efficient way of doing that. Any ideas? 回答1: If you load

Apache nutch: Manipulating the DOM before parsing

点点圈 提交于 2019-12-25 06:45:59
问题 I want to remove specific elements from the page response, before it is handed down to nutch. Specifically, I want to mark parts of my pages with i.e. <div class="noindex">I shall not be indexed</div> And want to remove them before nutch parse, so that "I shall not be indexed" is not present in the NutchDocument afterwards. I plan die surround my navigation, header, footer content with this because right now, they are present in every document in the index. Thanks, Paul 回答1: You have some

better search algorithm to increase the performance?

萝らか妹 提交于 2019-12-25 06:45:06
问题 I have list of students displaying in a page and I am storing the student information as object with id and name. I want to add search box to search students if I got a scroll bar in the list. And update the students list according to the search string. Right now i am iterating student object array and checking the index of the search string in the name. Is there any better algorithm to increase the performance. // my code: search = function(data,queryString) { var res = new array(); for(stu

Comparison of search speed for B-Tree and Trie

笑着哭i 提交于 2019-12-25 06:35:10
问题 I am trying to find out which will be more efficient in terms of speed of search, whether trie or B-Tree. I have a dictionary of English words and I want to locate a word in that dictionary efficiently. 回答1: If by "more efficient in time of search" you refer to theoretical time complexity, then B Tree offers O(logn * |S|) 1 time complexity for search, while a trie offers O(|S|) time complexity, where |S| is the length of the searched string, and n is the number of elements in dictionary. If

Search function, SQL Server

Deadly 提交于 2019-12-25 06:12:05
问题 I am creating a small search function on my site, this enables the search for articles in the system. Each article has a set of keywords associated to it and these keywords are stored inside a SQL Server database. This is the table: CREATE TABLE [dbo].[SearchWords] ( [ID] [int] IDENTITY(1,1) NOT NULL, [ArticleID] [int] NOT NULL, [SearchWord] [nvarchar](20) NOT NULL, CONSTRAINT [PK_SearchWords] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY

CakePHP Get Field Totals After Search Plugin Filtering

僤鯓⒐⒋嵵緔 提交于 2019-12-25 05:52:30
问题 I am trying to get the field totals for all results after filtering with the CakeDC search plugin. In my model I have: public function getFieldAmountTotal( $fieldNames){ // Can't use recursive -1 because it includes current filtering // This will only grab the total by id // Can't not pull id because filtering on related tables //$totalAmounts = $this->find( 'all', array('fields' => $fieldNames)); $totalAmounts = $this->find( 'all', array('fields' => $fieldNames, 'group' => 'MovieStar.id'));