Search Tags In Mysql Database
I'm creating a website that lists snippits of online articles. As tagging these articles will be very important, I've created a database structure as below. I'm now implementing searching of these tags with the hope to sort potentially 1000's of matches by relevance on tags and on date (the newer the better).
Before launching head first into this, can anyone point me in the way of a good tutorial specifically on tag searches. (I can find plenty of fulltext sytle search information, but not so much on tagging). Code:
View Complete Forum Thread with Replies
Related Forum Messages:
Save Real HTML Tags Into My Mysql Database.
I want to save real HTML tags into my mysql database. I use $p = htmlentities($content); to convert the strange characters to real html. Then from another page i echo the content from the database and i see real html tags which is what i want.But in the database its still saved as:
View Replies !
Text Search In MySQL Database
I am wiriting a PHP program that allows users to search item in the MySQL database. The items may have Chinese in their name or desciption. A form is created to allow users to input the search string and then it is transfer to another script to search the MySQL database by GET. I find that some strings can be found but some are not. Is it related to the property of Chinese characters.
View Replies !
Create A Simlpe Mysql Database Search
Im trying to create a simlpe mysql database search. I have a database called "lever" and then a table called "faults" Inside the table i have the following titles: Incident School Person Summary I want a search field that uses the "incident" filed to display data only in that row. I would like it to be displayed on a html page. Is anyone able to help me with the code. Ive tried using some that have been suggested on the web but I cant seem to configure them correctly.
View Replies !
Searching MySQL Database Search Fields
I have got the basic search elements working, but what is happening is this, if you don't enter any search criteria into any of the search fields the search returns all records, which i don't want to happen, if nothing is entered in to the search field I don't want any thing displayed. Below is a snippet of the code I am using <table> <tr><td align=right>Search Birth Name :</td><td> <input type="text" name="FULLNAME"></td></tr> <tr><td align=right>Search Married Name :</td><td> <input type="text" name="MARRIED_NAME"></td></tr> <tr><td><input type="submit" name="submit"></td></tr> </table> </form> </center> <?php include ("connection.php"); $FULLNAME = htmlspecialchars($FULLNAME); $MARRIED_NAME = htmlspecialchars($MARRIED_NAME); $query = "SELECT * FROM ADDRESSES WHERE FULLNAME LIKE "%$FULLNAME%" LIMIT 200"; $query2 = "SELECT * FROM ADDRESSES WHERE MARRIED_NAME LIKE "%$MARRIED_NAME%" LIMIT 200";
View Replies !
Making A Search Function For A MySQL Database
I'm wondering how I would go about making a search function for a MySQL database. Say I have this hierarchy: DB -Table1 -Row1 -Row2 -Row3 -Row4 -Row5 I want to be able to organize by each row, search by each row, list all, and list specific ones from a keyword.
View Replies !
Script Who Can Search Data (news) From MySQL Database.
I need PHP script who can search data (news) from MySQL database. I have to create database with just one table and 5 fields: 1. News number, 2. Date, 3. News heather, 4. News, 5. Picture. Do you have this script or can you help me to create this and integrate with Database for my non profit web site.
View Replies !
Search For Image Tags In A Bb Post
I need to search for image tags in a bb post. The tags can be [ img] or < img> (since I dont want vB to try and do something with it I put a space). Right now I have a loop to find the [ img] start and ending tags. It works great using strpos. But I really dont want to have to do this long loop again to find the start and end < img> tags. So I was wondering if anyone had any idea on how I can do this in one loop. Like with something simular to preg_match or something. Right now I have: while(($img_start = strpos($text,"[img]", $img_start)) !== false) { So something like: while(($img_start = strpos($text,"<|[ img]|>", $img_start)) !== false) {
View Replies !
Highlighting Search Text, But Not Inside Tags
I've looked at some examples of text highlighting in this forum, and they all work fairly well. But I have a problem with my html tags. I have a site where the main body text is kept in a database text field. This text can contain some simple html. In particular urls. These urls get completely messed up with the css-tags that i insert to highlight the search words. Is there a simple regex expression that can make my script skip anything between < and >? I am currently using the example from this thread:
View Replies !
PHP Includes, With Meta Tags & Search Engines
I am dealing with a site that has been organized of the php include function devised into four sections 1. header.php 2. nav.php 3. content.php 4. footer.php Basically, content.php includes the other 3 files in their respected spots. The question that I have, though this organization seem very efficient in order to make quick changes to the site, but how does this effect meta tags that may be indexed by search engines... Since the meta tags exist in one file header.php, then whow does a search engine index a specific page within the site.
View Replies !
Problem Related To Search For Arabic Meta Tags
I have special problem in using Meta tags searching, I have succeed to use attached php page to make perfect Meta tags searching trough any site pages, but the problem raises when I try to use the same php code to search Arabic meta tags, I totally failed to fix this problem, no result was generated for Arab tags.
View Replies !
Search A Column Within My MySQL Database For Matches/partial Matches
I have built a form on a page that points to ProcessForm.php (The form has just one text entry field). At ProcessForm.php, I am trying to put the php code on the page that will take what was entered by the user and search a column within my MySQL database for matches/partial matches. The aim is to then display found matches on a HTML page, basically similar to the way Kelkoo would work when you search for a product. Code:
View Replies !
How To Get Html Tags From A Database ?
I have a database where people themself put a profilname into. I have just had a user who called his profil HisName<something> When this was written in my profil name list it only said HisName. Probably because the browser thought that <something> was html coding. So how can I get a name like that from the database without any mistakes by the browser. Is there some special way I should get the data from the database, or ?? I looked in MyPhpAdmin and here his name was HisName<something> so it is put in the database OK, it's when I get the name in the browser it can't get it right.
View Replies !
HTML Tags In Database
I'm using WYSIWYG editor to add some contents into database. When i add the contents in the database they are displayed the same way as when i write them in the editor, however i want them to be displayed with html tags. e.g i don't want them saved in the db as 'text' but as '<p>text</p>'. $text = htmlspecialchars($text) before adding contents into the db should be working.
View Replies !
Fulltext Search: Search All Tables In Database
I was wondering how does one create fulltext search all tables in database? As MySQL supports fulltext only with MyISAM, and MyISAM do not support relations, how am I supposed to search all tables, as in my database there are almost 20 tables?
View Replies !
How To Store Textarea With Special Tags In A Database
Special tags means, tags in a "[" "]", like "[legend]". Then i sumbit a form to a server, is i store it in a database this special tags or convert it to a html tags like (url)=>(a) before inserting, and then reediting it i make inverting html tags to a special tags (a)=>(url) (like in this forum). In the other words i need to know, then phase of converting tags is happend, before inserting to a database or then it selected from database, before it showing to a user.
View Replies !
Conditional Statement - Glossary Database (glos) That Can Search The Database
I'm setting up a glossary database (glos) that can search the database for '$sometext' using a form, and then prints out a list of all the words that match with their respective links. The following code works just fine. But if there are no results, I get just a blank page. I would love to get something like "Sorry but your word is not in the database" plus some extra stuff like another form to submit the new word, etc. I just don't know where or how to put in a logic script for if there are no results, do something else. Thanks for any help you can give a php newbie. <? $result = mysql_query( "select * from glos where $word like '%$sometext%' order by word"); while ($i = mysql_fetch_array($result)){ print <<<END <a href="/definition.php?word={$i['word']}">{$i['word']}</a><br> END; } mysql_close(); ?>
View Replies !
Strip Tags Functions To Format The Text From The Database
I am here trying loads of different strip tags functions to format the text from the database the way I want, but it doesnt seem to be working. If you look at the below example. The bottom images shows how the text is currently been pulled and displayed from the database. I am looking to just format it as normal text when its been displayed in the result.
View Replies !
Search Function - Search In MySql Databases., How To?
How do I set up a page where the visitors can search through a mysql database? It's linxcafe.net Im talking about. I want the visitors to be able to seach among all my links (both categories and links) so they find what they are looking for easier. I have searched on google after tutorials on this but I have only found complicated ones.
View Replies !
MySQL Meta Tags
The end result of what I am looking to do with PHP/MySQL is this: <meta name="keywords" content="<?=$ContentKeywords['keywords']['content']?>" /> <meta name="description content="<?=ContentDescription['description']['content']?>" /> My code looks like this: $sql = "SELECT Id, Name, Content FROM ContentMetas"; $res = mysql_query( $sql ); $metas = mysql_fetch_assoc( $res ); return $metas; So when I use this: <meta name="keywords" content="<?=$ContentKeywords['keywords']['content']?>" />
View Replies !
Database Search -text Database...
Can anybody tell me how to search a flat file database delimited by |. I have exploded the data and managed to get it into a table but want to restrict the final table contents by a search. The table code at the moment is below - I'd be using a htm file to submit the data. and hopefully be able to search by partial searches eg big would return big and bigfoot. Code:
View Replies !
Include Some Dynamic Tags Such As A Date Format Tags
I'm building a very simple templating system, that will allow partners to create/edit custom templates. I want to include some dynamic tags such as a date format tags. which would look like <tag:date format="m.d.y"/> I was thinking of using XPath, however I found that when using DomDocument with LoadHTML or LoadXML that it was very particular about the formating and if it was messy code.
View Replies !
Text Links To <a> Tags, But Leave <a> Tags
As the title says, all I need to do, is convert (maybe multiple) text links (eg. http://bla.com or ftp://bla.com) to plain simple html links (<a href="http://bla.com">http://bla.com</a>) I have search the forums, but did not seem to find anything.
View Replies !
Search From Database
IM looking for a better way to get results from search? IM currently using mysql_fetch_array and don't want my search to be in order. So if someone search for a word mysql_fetch_array will search in order of witch one was added to the database or from last. What I would like to have happen is more random or wildcard search. Is there a better way?
View Replies !
How To Search In A Database
I have a table called "lista" into my mysql database.This table has 5 text columns : "TRANSLATEDTITLE" "ORIGINALTITLE" "ACTORS" "DIRECTOR" "YEAR" , and 1 image column called "COVER". I want to create a page with a form to search entries into this table (ex. with Title, Actors, Director, Year), and anotger php page with the search results shown inside, everyone with a link that opens a pop window (ex. 400X320). Who does give me an hand ??? I've seen the Codewalkers solution, but it searchs with another metod of searching (a selectable string with different category of searching). I need a simple search script with these two pages...
View Replies !
How To Search Without Database
i am developing a site and everything on the site is static meaning no database. now, they wanted to add a search tool bar thats is only meant to search by keywords my problem is i dont know how to do it because i have done it before.
View Replies !
Search Without SQL Database
Anyone able to point me in the direction of a no database php search tutorial or throw up an example. Basically, I need to search for non HTML elements pages within a directory.
View Replies !
Search My Database
I have a function that allows my users to search my database, and i want to limit the mumber of queries a user can do in a given 24 hour period. I can write a script that increments a field in my database everytime a user conducts a search, and i can stop them searching if this value is at a given limit. But how do i go about resetting this field to zero every 24 hours?
View Replies !
Database Search
i am looking for a script that has a page like a search page that can go and find results from a database or text file something like that does any one know of any i have been looking for a while and dont know of any.
View Replies !
Use Word To Search The Database:
I have a user who will input a word into a search form. I want to use this word to search the database: any ideas how I can write the mysql code for this. I'm thinking $query = "SELECT * FROM table WHERE col1 like '$search or col2 like '$search etc... anyway I can write this code without doing the above, so that it runs faster--something that will search all the columns with me have to do all the where clauses.
View Replies !
Search Database - MATCH() AGAINST() Or LIKE
I have a fairly basic database that holds articles that visitors of my web site can search based on content of the articles and the author. Simplified the tables look like this... articles +-----------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+-------+ | doc_id | varchar(8) | | PRI | | | | title | varchar(255) | YES | MUL | NULL | | | date | date | YES | | NULL | | | source | text | YES | | NULL | | | abstract | text | YES | MUL | NULL | | | body | mediumtext | YES | | NULL | | +-----------------+--------------+------+-----+---------+-------+ authors +---------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------+----------------+ | author_id | int(11) | | PRI | NULL | auto_increment | | doc_id | varchar(8) | YES | | NULL | | | author | varchar(100) | YES | MUL | NULL | | +---------------+--------------+------+-----+---------+----------------+ The Authors name is kept in the form of first initial, middle initial (if known) and last name (ie J. Bloggs). Basically users have two fields they can complete for searching. One is the keywords (ie words in the body of the article) and the other is for the author of the article. Currently I perform a full text search to find authors that match the author they enter but I'm not sure this is the best method as authors with short last names (ie. Li or Cho) can't be found. This is the code I am using to generate a query to search the database. PHP Code:
View Replies !
Search Item In Database
I made a function that does a case insensitive search. This works fine. But i'd like to improve that script so that it also returns items from the database that are partly similar to the search string. this is the script atm:
View Replies !
Database Search Engine
how do i make php script for searching in mysql database? i want to make a student search.. the field is student_number, name, address, and faculty. what would the php script look like?
View Replies !
Some Database Search Tips
I have this database where I get like thousand of searches every day. But I think it is running a bit slow. Do you have any tips on how to improve it and keeping it flow.
View Replies !
Database Search Problems
I have managed to connect to the database fine and I think I understand that I want to post the information, and I am posting it to the page that I am currently on, as I want the results to be displayed below the search form. There should only be one result no matter what search in entered. I am getting some results, but they are inconsistent. Postcode seems to work but nothing else, the other 2 input fields always return the third record in the database no matter what value is entered. Code:
View Replies !
Database Search Results
i have a paid to read website,im hosting it off my own pc..as a member you can search offers and complete them, heres where i need some help..when a member clicks submit and the offer goes to an offerdone table i need the offer to hide from them so they cant do it again,also that same offer needs to hide in the search results as well...is there somthing like onclick hide and for the results something like if duplicate hide from search or if offer found in this table hide from results... there are 2 tables one will all my offers the other with offer they have done,also this needs to apply for each member account.i am new to all this and have made it this far to have my site up and going but im looking for those extra catchs i could really use,so that a member cant repeat an offer they have already done,
View Replies !
One To Many Database Search Results
I am using PHP to search a MySQL database I can search multiple tables successfully but I want to display one result from one table, with multiple results from another table: In my database one practice example has more than one category. My current PHP displays all the fields for the practice example with every relevant category. I want to display the practice example details once, then list all the categories for that practice example. Code:
View Replies !
Fast Search On My Database
I have a news database with over 35 000 articles and I need something that can search through these articles at high speed.Right now I use a fulltext search MATCH AGAINST, but every fulltext search query takes about 2 seconds. I have 3 blocks with news on every page (today, yesterday and last week), so I need 3 queries to get those articles. I use page tabs for every date/period. So today has 10 results per page and I can click on a page tab to get the next 10 (11-20). For example, I use LIMIT 11,20 in the query for the second page. To do this, I need to know how many articles there are in total, so I need another query per date/period. That is 6 queries in total, making the page take 12 seconds to load. I think that's too long. Does anyone know a faster way to do this?
View Replies !
Search Engine For A Database
i have a search field where the user types a keyword: for example "nokia 6600" i have a table, with field for the brand name "nokia" and field for the modelname "6600" so i guess i need first to join the values of the brand name and model name fields, and then do a search on them with LIKE %nokia%6600% how to do it? Code:
View Replies !
Display Database Search
I'm a php newbie and i hope someone can help me with my search which i can't get the expected output. Here is my code. <snipped code dump> it display Database Search returned 6 items containing "". while the page is loaded or the "Search" button been clicked.
View Replies !
Script To Search Database
Can anyone point me to a good script to search a database? I've googled it... those found either don't work very well, or won't work if someone inputs more than one word in the search box.
View Replies !
Search For Text In A Database
A user writes this sentence: "It was the New Urbanist's nightmare of sprawl run amok." They input that and my PHP script hits it with addslashes() and then the sentence gets put in the database. A slash is likely inserted in front of the quote mark in "Urbanist's". Later the user runs a search of the database for "New Urbanist's nightmare". Even if I run this query using LIKE, nothing will come back? Should I hit the text with addslashes before I run the search? How do most coders handle this?
View Replies !
|